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:
@@ -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"
|
||||
]))
|
||||
|
||||
Reference in New Issue
Block a user