summary refs log tree commit diff
path: root/pkgs/build-support/rust
diff options
context:
space:
mode:
authorChristian Kauhaus <kc@flyingcircus.io>2017-03-30 15:15:49 +0200
committerRobin Gloster <mail@glob.in>2017-03-30 15:15:49 +0200
commit09f24f628b64ada599616271ff4809eddb59eb0c (patch)
treee62597222d12cc14cebf9bbcb09a246b4a220898 /pkgs/build-support/rust
parente15b666f79a1e0c80abd36ca59fa734f6ba8be0a (diff)
downloadnixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.tar
nixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.tar.gz
nixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.tar.bz2
nixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.tar.lz
nixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.tar.xz
nixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.tar.zst
nixpkgs-09f24f628b64ada599616271ff4809eddb59eb0c.zip
buildRustPackage: Fix "warning: file ... may be generated" (#24471)
Every Rust derivation used to emit a warning like the following:

```
setting SOURCE_DATE_EPOCH to timestamp 1490877042 of file cargo-6e0c18c/Cargo.lock
warning: file cargo-6e0c18c/Cargo.lock may be generated; SOURCE_DATE_EPOCH may be non-deterministic
```

The reason is that the dependencies are copied without preserving
timestamps. Changing the build script to timestamp-preserving copy
removes the warning.
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r--pkgs/build-support/rust/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix
index a69ef5c6b07..91569d0c070 100644
--- a/pkgs/build-support/rust/default.nix
+++ b/pkgs/build-support/rust/default.nix
@@ -33,7 +33,7 @@ in stdenv.mkDerivation (args // {
 
     echo "Using cargo deps from $cargoDeps"
 
-    cp -r "$cargoDeps" deps
+    cp -a "$cargoDeps" deps
     chmod +w deps -R
 
     # It's OK to use /dev/null as the URL because by the time we do this, cargo