From 8e59ce1e26f7a77ddc9a4535b8332eaac7345a23 Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Sat, 26 Jul 2025 12:12:06 +0200 Subject: [PATCH] buildRustPackage: warn on explicit useFetchCargoVendor --- pkgs/build-support/rust/build-rust-package/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix index 9c9b70684474..7efbc8a9ea36 100644 --- a/pkgs/build-support/rust/build-rust-package/default.nix +++ b/pkgs/build-support/rust/build-rust-package/default.nix @@ -72,7 +72,11 @@ lib.extendMkDerivation { }@args: assert lib.assertMsg useFetchCargoVendor - "buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05"; + "buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it"; + + assert lib.warnIf (args ? useFetchCargoVendor) + "buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it" + true; lib.optionalAttrs (stdenv.hostPlatform.isDarwin && buildType == "debug") { RUSTFLAGS = "-C split-debuginfo=packed " + (args.RUSTFLAGS or "");