diff options
author | Clemens Fruhwirth <clemens@endorphin.org> | 2018-11-25 15:20:24 +0100 |
---|---|---|
committer | Clemens Fruhwirth <clemens@endorphin.org> | 2018-11-25 15:26:31 +0100 |
commit | 8d4fbc55d839374090fbf45250d40e18e12b4e48 (patch) | |
tree | 58cb235e46a5685d0e6f8d9d33756c061a65ed4e /pkgs/build-support | |
parent | 7d24cf8ea99cb869193fef4553353e77594f329c (diff) | |
download | nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.tar nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.tar.gz nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.tar.bz2 nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.tar.lz nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.tar.xz nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.tar.zst nixlib-8d4fbc55d839374090fbf45250d40e18e12b4e48.zip |
Write cargo config to temporary file instead of source dir.
... as this fails if the source dir contains a "config" directory.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/rust/fetchcargo.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/rust/fetchcargo.nix b/pkgs/build-support/rust/fetchcargo.nix index 9e77f8817b24..c231799552f4 100644 --- a/pkgs/build-support/rust/fetchcargo.nix +++ b/pkgs/build-support/rust/fetchcargo.nix @@ -38,18 +38,19 @@ stdenv.mkDerivation { fi export CARGO_HOME=$(mktemp -d cargo-home.XXX) + CARGO_CONFIG=$(mktemp cargo-config.XXXX) ${cargoUpdateHook} mkdir -p $out - cargo vendor $out | cargo-vendor-normalise > config + cargo vendor $out | cargo-vendor-normalise > $CARGO_CONFIG # fetchcargo used to never keep the config output by cargo vendor # and instead hardcode the config in ./fetchcargo-default-config.toml. # This broke on packages needing git dependencies, so now we keep the config. # But not to break old cargoSha256, if the previous behavior was enough, # we don't store the config. - if ! cmp config ${./fetchcargo-default-config.toml} > /dev/null; then - install -Dt $out/.cargo config; + if ! cmp $CARGO_CONFIG ${./fetchcargo-default-config.toml} > /dev/null; then + install -Dt $out/.cargo $CARGO_CONFIG; fi; ''; |