3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Christian Kauhaus 2017-03-30 15:15:49 +02:00 committed by Robin Gloster
parent e15b666f79
commit 09f24f628b

View file

@ -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