mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 22:32:58 +03:00
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:
parent
a63d28e62e
commit
839c9e9344
@ -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"
|
||||
]))
|
||||
|
Loading…
Reference in New Issue
Block a user