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.
This commit is contained in:
Alyssa Ross 2019-12-02 21:08:16 +00:00
parent a63d28e62e
commit 839c9e9344

View file

@ -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"
]))