diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-12-02 21:08:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-12-23 18:27:56 +0000 |
commit | 839c9e9344e8dc9f22f7562c8b0a3cb178eb5048 (patch) | |
tree | d63b5e1235b71e33883653256a78267e31ed1e50 /pkgs/build-support/rust | |
parent | a63d28e62e972e827b02ab4eb1e7e7213c101651 (diff) | |
download | nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.tar nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.tar.gz nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.tar.bz2 nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.tar.lz nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.tar.xz nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.tar.zst nixpkgs-839c9e9344e8dc9f22f7562c8b0a3cb178eb5048.zip |
rustPlatform: forward fetchcargo args to stdenv
Most stdenv wrappers already work like this -- it allows greater customisation. We just have to be careful to remove arguments we're using that shouldn't be passed to stdenv. I've been conservative here, because fetchcargo checksums shouldn't change lightly.
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r-- | pkgs/build-support/rust/fetchcargo.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/build-support/rust/fetchcargo.nix b/pkgs/build-support/rust/fetchcargo.nix index a515ce9c6eb..01e410c8bf8 100644 --- a/pkgs/build-support/rust/fetchcargo.nix +++ b/pkgs/build-support/rust/fetchcargo.nix @@ -26,11 +26,11 @@ in , cargoUpdateHook ? "" , # whenever to also include the Cargo.lock in the output copyLockfile ? false -}: -stdenv.mkDerivation { +, ... +} @ args: +stdenv.mkDerivation ({ name = "${name}-vendor"; nativeBuildInputs = [ cacert git cargo-vendor-normalise cargo ]; - inherit src srcs patches sourceRoot; phases = "unpackPhase patchPhase installPhase"; @@ -76,4 +76,6 @@ stdenv.mkDerivation { impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; preferLocalBuild = true; -} +} // (builtins.removeAttrs args [ + "name" "sha256" "cargoUpdateHook" "copyLockfile" +])) |