buildRustPackage: warn on explicit useFetchCargoVendor

(cherry picked from commit 8e59ce1e26)
This commit is contained in:
Niklas Korz
2025-07-26 12:12:06 +02:00
parent 85b97a53f7
commit 777cdc5a8b

View File

@@ -73,7 +73,11 @@ lib.extendMkDerivation {
}@args: }@args:
assert lib.assertMsg useFetchCargoVendor assert lib.assertMsg useFetchCargoVendor
"buildRustPackage: `useFetchCargoVendor` is nonoptional and enabled by default as of 25.05"; "buildRustPackage: `useFetchCargoVendor` is nonoptional and enabled by default as of 25.05, remove it";
assert lib.warnIf (args ? useFetchCargoVendor)
"buildRustPackage: `useFetchCargoVendor` is nonoptional and enabled by default as of 25.05, remove it"
true;
lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") { lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") {
RUSTFLAGS = "-C split-debuginfo=packed " + (args.RUSTFLAGS or ""); RUSTFLAGS = "-C split-debuginfo=packed " + (args.RUSTFLAGS or "");