From 09f24f628b64ada599616271ff4809eddb59eb0c Mon Sep 17 00:00:00 2001 From: Christian Kauhaus Date: Thu, 30 Mar 2017 15:15:49 +0200 Subject: 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. --- pkgs/build-support/rust/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/build-support/rust') 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 -- cgit 1.4.1