From 777cdc5a8b394f640f12992209ab3655eefa7cad 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 (cherry picked from commit 8e59ce1e26f7a77ddc9a4535b8332eaac7345a23) --- 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 b978d4e6256e..305e65ea9a64 100644 --- a/pkgs/build-support/rust/build-rust-package/default.nix +++ b/pkgs/build-support/rust/build-rust-package/default.nix @@ -73,7 +73,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 "");