buildRustPackage: simplify the cargoDeps specification

This commit is contained in:
Yueh-Shun Li
2025-02-25 00:27:11 +08:00
parent d84d1eeb22
commit 89c72ca6a2
@@ -72,9 +72,11 @@ lib.extendMkDerivation {
...
}@args:
let
cargoDeps' =
lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") {
RUSTFLAGS = "-C split-debuginfo=packed " + (args.RUSTFLAGS or "");
}
// {
cargoDeps =
if cargoVendorDir != null then
null
else if cargoDeps != null then
@@ -125,12 +127,6 @@ lib.extendMkDerivation {
}
// depsExtraArgs
);
in
lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") {
RUSTFLAGS = "-C split-debuginfo=packed " + (args.RUSTFLAGS or "");
}
// {
cargoDeps = cargoDeps';
inherit buildAndTestSubdir;
cargoBuildType = buildType;