From 5132f55921dcccbd7ad87567a5d1f8ccfdda2d43 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:35 +0100 Subject: [PATCH 01/28] alvr: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/al/alvr/package.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/al/alvr/package.nix b/pkgs/by-name/al/alvr/package.nix index d1d757157b26..cad1f3853cbd 100644 --- a/pkgs/by-name/al/alvr/package.nix +++ b/pkgs/by-name/al/alvr/package.nix @@ -78,18 +78,19 @@ rustPlatform.buildRustPackage rec { "-lpng" "-lssl" ]; + RUSTFLAGS = toString ( + map (a: "-C link-arg=${a}") [ + "-Wl,--push-state,--no-as-needed" + "-lEGL" + "-lwayland-client" + "-lxkbcommon" + "-Wl,--pop-state" + ] + ); }; - RUSTFLAGS = map (a: "-C link-arg=${a}") [ - "-Wl,--push-state,--no-as-needed" - "-lEGL" - "-lwayland-client" - "-lxkbcommon" - "-Wl,--pop-state" - ]; - cargoBuildFlags = [ - "--exclude alvr_xtask" + "--exclude=alvr_xtask" "--workspace" ]; From d4e88e34b484d29937f6bf0748dd06b5dfa478d9 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:36 +0100 Subject: [PATCH 02/28] asusctl: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/as/asusctl/package.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/as/asusctl/package.nix b/pkgs/by-name/as/asusctl/package.nix index b322fba81723..e0856ee9d559 100644 --- a/pkgs/by-name/as/asusctl/package.nix +++ b/pkgs/by-name/as/asusctl/package.nix @@ -77,14 +77,18 @@ rustPlatform.buildRustPackage rec { wayland ]; - # force linking to all the dlopen()ed dependencies - RUSTFLAGS = map (a: "-C link-arg=${a}") [ - "-Wl,--push-state,--no-as-needed" - "-lEGL" - "-lfontconfig" - "-lwayland-client" - "-Wl,--pop-state" - ]; + env = { + # force linking to all the dlopen()ed dependencies + RUSTFLAGS = toString ( + map (a: "-C link-arg=${a}") [ + "-Wl,--push-state,--no-as-needed" + "-lEGL" + "-lfontconfig" + "-lwayland-client" + "-Wl,--pop-state" + ] + ); + }; # upstream has minimal tests, so don't rebuild twice doCheck = false; From b094a676af6f266b78065f35c40152102a3f0f21 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:36 +0100 Subject: [PATCH 03/28] caligula: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/ca/caligula/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ca/caligula/package.nix b/pkgs/by-name/ca/caligula/package.nix index 7084041552b8..33fede21aca3 100644 --- a/pkgs/by-name/ca/caligula/package.nix +++ b/pkgs/by-name/ca/caligula/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { rustPlatform.bindgenHook ]; - RUSTFLAGS = "--cfg tracing_unstable"; + env.RUSTFLAGS = "--cfg tracing_unstable"; meta = { description = "User-friendly, lightweight TUI for disk imaging"; From 3a786efe148c29c19623fa8bd1c8e933bc961404 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:36 +0100 Subject: [PATCH 04/28] firezone-gateway: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/fi/firezone-gateway/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fi/firezone-gateway/package.nix b/pkgs/by-name/fi/firezone-gateway/package.nix index a17287029514..e71acd697d53 100644 --- a/pkgs/by-name/fi/firezone-gateway/package.nix +++ b/pkgs/by-name/fi/firezone-gateway/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-8YftVt72JpmxWB/WvOPpduE0/QgYvQhSuFRmsFth2iU="; sourceRoot = "${src.name}/rust"; buildAndTestSubdir = "gateway"; - RUSTFLAGS = "--cfg system_certs"; + env.RUSTFLAGS = "--cfg system_certs"; # Required to remove profiling arguments which conflict with this builder postPatch = '' From 4d09b2c9c68b895d8fe67815d74a65c0ef88da74 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:36 +0100 Subject: [PATCH 05/28] firezone-gui-client: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/fi/firezone-gui-client/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fi/firezone-gui-client/package.nix b/pkgs/by-name/fi/firezone-gui-client/package.nix index 2c9ddac6b374..b45ab51dd27e 100644 --- a/pkgs/by-name/fi/firezone-gui-client/package.nix +++ b/pkgs/by-name/fi/firezone-gui-client/package.nix @@ -82,7 +82,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-TDP1Z4MeQaSER8MGnCEQfIhRsakaSCeJ7boUMBYkkI0="; sourceRoot = "${src.name}/rust"; buildAndTestSubdir = "gui-client"; - RUSTFLAGS = "--cfg system_certs"; + env.RUSTFLAGS = "--cfg system_certs"; nativeBuildInputs = [ cargo-tauri.hook From 55f2de34e10f0357476dd14f0f39aa0688e9fb73 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:37 +0100 Subject: [PATCH 06/28] firezone-headless-client: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/fi/firezone-headless-client/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fi/firezone-headless-client/package.nix b/pkgs/by-name/fi/firezone-headless-client/package.nix index b141c4e925c4..dcabff9da084 100644 --- a/pkgs/by-name/fi/firezone-headless-client/package.nix +++ b/pkgs/by-name/fi/firezone-headless-client/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-J2IqqFBuoTkbO0nMJbY680G2HTAtC1To/nMra2PCopY="; sourceRoot = "${src.name}/rust"; buildAndTestSubdir = "headless-client"; - RUSTFLAGS = "--cfg system_certs"; + env.RUSTFLAGS = "--cfg system_certs"; # Required to remove profiling arguments which conflict with this builder postPatch = '' From 38f1a7015c488748e4d1ad9345ef992bf18a3812 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:37 +0100 Subject: [PATCH 07/28] firezone-relay: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/fi/firezone-relay/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fi/firezone-relay/package.nix b/pkgs/by-name/fi/firezone-relay/package.nix index 720d3eecd438..83282a0b8458 100644 --- a/pkgs/by-name/fi/firezone-relay/package.nix +++ b/pkgs/by-name/fi/firezone-relay/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-uqy4GgYaSX2kM4a37093lHmhvOtNUhkEs6/ZS1bjuYo="; sourceRoot = "${src.name}/rust"; buildAndTestSubdir = "relay"; - RUSTFLAGS = "--cfg system_certs"; + env.RUSTFLAGS = "--cfg system_certs"; # Required to remove profiling arguments which conflict with this builder postPatch = '' From 80eb0edfcb5ab648018ff535c957ffae2e0fa353 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:37 +0100 Subject: [PATCH 08/28] gossip: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/go/gossip/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/go/gossip/package.nix b/pkgs/by-name/go/gossip/package.nix index 4821daaab8e8..6665a892c2d1 100644 --- a/pkgs/by-name/go/gossip/package.nix +++ b/pkgs/by-name/go/gossip/package.nix @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-rE7SErOhl2fcmvLairq+mvdnbDIk1aPo3eYqwRx5kkA="; # See https://github.com/mikedilger/gossip/blob/0.9/README.md. - RUSTFLAGS = "--cfg tokio_unstable"; + env.RUSTFLAGS = "--cfg tokio_unstable"; # Some users might want to add "rustls-tls(-native)" for Rust TLS instead of OpenSSL. buildFeatures = [ From dabfe7cbbcf27764670e74274f8feafce7f5fc1f Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:37 +0100 Subject: [PATCH 09/28] idmail: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/id/idmail/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/id/idmail/package.nix b/pkgs/by-name/id/idmail/package.nix index 7c955fd469d1..41b05845bccf 100644 --- a/pkgs/by-name/id/idmail/package.nix +++ b/pkgs/by-name/id/idmail/package.nix @@ -34,8 +34,10 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-UcS2gAoa2fzPu6hh8I5sXSHHbAmzsecT44Ju2CVsK0Q="; - RUSTC_BOOTSTRAP = 1; - RUSTFLAGS = "--cfg=web_sys_unstable_apis"; + env = { + RUSTC_BOOTSTRAP = 1; + RUSTFLAGS = "--cfg=web_sys_unstable_apis"; + }; nativeBuildInputs = [ wasm-bindgen-cli_0_2_100 From d9d402fd5b96e5bc03999785c26c5a8bc1282213 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:38 +0100 Subject: [PATCH 10/28] kime: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/ki/kime/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ki/kime/package.nix b/pkgs/by-name/ki/kime/package.nix index 2fe8019f549f..e426b3f45bec 100644 --- a/pkgs/by-name/ki/kime/package.nix +++ b/pkgs/by-name/ki/kime/package.nix @@ -128,9 +128,11 @@ stdenv.mkDerivation (finalAttrs: { cargo ]; - RUST_BACKTRACE = 1; - # https://github.com/Riey/kime/issues/688 - RUSTFLAGS = "-Clink-args=-L./target/release"; + env = { + RUST_BACKTRACE = 1; + # https://github.com/Riey/kime/issues/688 + RUSTFLAGS = "-Clink-args=-L./target/release"; + }; meta = { homepage = "https://github.com/Riey/kime"; From e15b60a4d0b55df56c717f18509727f1a3fd330a Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:38 +0100 Subject: [PATCH 11/28] lact: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/la/lact/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/la/lact/package.nix b/pkgs/by-name/la/lact/package.nix index ef9cf6a8192e..a15cec0beec7 100644 --- a/pkgs/by-name/la/lact/package.nix +++ b/pkgs/by-name/la/lact/package.nix @@ -53,7 +53,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ]; # we do this here so that the binary is usable during integration tests - RUSTFLAGS = lib.optionalString stdenv.targetPlatform.isElf ( + env.RUSTFLAGS = lib.optionalString stdenv.targetPlatform.isElf ( lib.concatStringsSep " " [ "-C link-arg=-Wl,-rpath,${ lib.makeLibraryPath [ From b926963409f055350f4ed819fd399dc5453b3759 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:38 +0100 Subject: [PATCH 12/28] miro: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/mi/miro/package.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/mi/miro/package.nix b/pkgs/by-name/mi/miro/package.nix index 69877851fcd2..d8242fb5b98a 100644 --- a/pkgs/by-name/mi/miro/package.nix +++ b/pkgs/by-name/mi/miro/package.nix @@ -36,13 +36,15 @@ rustPlatform.buildRustPackage (finalAttrs: { libglvnd ]; - RUSTFLAGS = map (a: "-C link-arg=${a}") [ - "-Wl,--push-state,--no-as-needed" - "-lEGL" - "-lwayland-client" - "-lxkbcommon" - "-Wl,--pop-state" - ]; + env.RUSTFLAGS = toString ( + map (a: "-C link-arg=${a}") [ + "-Wl,--push-state,--no-as-needed" + "-lEGL" + "-lwayland-client" + "-lxkbcommon" + "-Wl,--pop-state" + ] + ); doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook ]; From 9a05cd27ea00398dae8d580757f61c271728e268 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:38 +0100 Subject: [PATCH 13/28] mitra: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/mi/mitra/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/mi/mitra/package.nix b/pkgs/by-name/mi/mitra/package.nix index 52c86feb8c44..7a62527e4d4f 100644 --- a/pkgs/by-name/mi/mitra/package.nix +++ b/pkgs/by-name/mi/mitra/package.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { # require running database doCheck = false; - RUSTFLAGS = [ + env.RUSTFLAGS = toString [ # MEMO: mitra use ammonia crate with unstable rustc flag "--cfg=ammonia_unstable" ]; From 5ba23e33e507e101bdd43ee20ffeefbb17568f3d Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:39 +0100 Subject: [PATCH 14/28] proxmox-backup-client: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/pr/proxmox-backup-client/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pr/proxmox-backup-client/package.nix b/pkgs/by-name/pr/proxmox-backup-client/package.nix index 46461df67457..1ba669faae8b 100644 --- a/pkgs/by-name/pr/proxmox-backup-client/package.nix +++ b/pkgs/by-name/pr/proxmox-backup-client/package.nix @@ -124,13 +124,14 @@ rustPlatform.buildRustPackage { "--bin=pxar" ]; - RUSTFLAGS = [ "-L.dep-stubs" ]; + env = { + RUSTFLAGS = toString [ "-L.dep-stubs" ]; + # pbs-buildcfg requires this set, would be the git commit id + REPOID = ""; + }; doCheck = false; - # pbs-buildcfg requires this set, would be the git commit id - REPOID = ""; - nativeBuildInputs = [ pkgconf rustPlatform.bindgenHook From 232fe4c7e9e39cf6df63bced3124dbecc6f33957 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:39 +0100 Subject: [PATCH 15/28] rcp: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/rc/rcp/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/rc/rcp/package.nix b/pkgs/by-name/rc/rcp/package.nix index d7708a0c0cc0..fcaefb4265cc 100644 --- a/pkgs/by-name/rc/rcp/package.nix +++ b/pkgs/by-name/rc/rcp/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-AcH5V5hapVQgGrwWAEN6Xpj00RRNqZiCSn+/onpmd50="; - RUSTFLAGS = "--cfg tokio_unstable"; + env.RUSTFLAGS = "--cfg tokio_unstable"; checkFlags = [ # these tests set setuid permissions on a test file (3oXXX) which doesn't work in a sandbox From 9d699d0fa7b208243a63b7a69db2b66c790af91d Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:39 +0100 Subject: [PATCH 16/28] restate: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/re/restate/package.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/re/restate/package.nix b/pkgs/by-name/re/restate/package.nix index 91c7e175df8e..38cfca80005a 100644 --- a/pkgs/by-name/re/restate/package.nix +++ b/pkgs/by-name/re/restate/package.nix @@ -100,13 +100,14 @@ rustPlatform.buildRustPackage (finalAttrs: { checkFlags = [ # Error: deadline has elapsed - "--skip replicated_loglet" - + "--skip" + "replicated_loglet" # TIMEOUT [ 180.006s] - "--skip fast_forward_over_trim_gap" - - # TIMEOUT (could be related to https://github.com/restatedev/restate/issues/3043) - "--skip restatectl_smoke_test" + "--skip" + "fast_forward_over_trim_gap" + # TIMEOUT (could be related to https://github.com/resytatedev/restate/issues/3043) + "--skip" + "restatectl_smoke_test" ]; __darwinAllowLocalNetworking = true; From 83cd5892d13e9d7d0d6ad7bb18a1a2f459e4e5b4 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:39 +0100 Subject: [PATCH 17/28] ripgrep-all: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/ri/ripgrep-all/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ri/ripgrep-all/package.nix b/pkgs/by-name/ri/ripgrep-all/package.nix index cbcdffaecdff..d85e4b488ebf 100644 --- a/pkgs/by-name/ri/ripgrep-all/package.nix +++ b/pkgs/by-name/ri/ripgrep-all/package.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-v+lLCI2ti/xL8hcGkm/xDDN9qk0G9MgtijE8xYnhC68="; # override debug=true set in Cargo.toml upstream - RUSTFLAGS = "-C debuginfo=none"; + env.RUSTFLAGS = "-C debuginfo=none"; nativeBuildInputs = [ makeWrapper From 4184b094df4c7324de26f4a1259aee6c0393fd10 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:40 +0100 Subject: [PATCH 18/28] sqld: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/sq/sqld/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sq/sqld/package.nix b/pkgs/by-name/sq/sqld/package.nix index 8254f81468b0..c814d4d303d3 100644 --- a/pkgs/by-name/sq/sqld/package.nix +++ b/pkgs/by-name/sq/sqld/package.nix @@ -55,10 +55,12 @@ rustPlatform.buildRustPackage rec { zstd ]; - env.ZSTD_SYS_USE_PKG_CONFIG = true; + env = { + ZSTD_SYS_USE_PKG_CONFIG = true; - # error[E0425]: cannot find function `consume_budget` in module `tokio::task` - env.RUSTFLAGS = "--cfg tokio_unstable"; + # error[E0425]: cannot find function `consume_budget` in module `tokio::task` + RUSTFLAGS = "--cfg tokio_unstable"; + }; # requires a complex setup with podman for the end-to-end tests doCheck = false; From 482f0f53348795123ae22d9cc7d047180f8802c3 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:40 +0100 Subject: [PATCH 19/28] surrealdb: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/su/surrealdb/package.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/su/surrealdb/package.nix b/pkgs/by-name/su/surrealdb/package.nix index affd7a93ed0a..133674bb10a0 100644 --- a/pkgs/by-name/su/surrealdb/package.nix +++ b/pkgs/by-name/su/surrealdb/package.nix @@ -26,13 +26,15 @@ rustPlatform.buildRustPackage (finalAttrs: { rm .cargo/config.toml ''; - PROTOC = "${protobuf}/bin/protoc"; - PROTOC_INCLUDE = "${protobuf}/include"; + env = { + PROTOC = "${protobuf}/bin/protoc"; + PROTOC_INCLUDE = "${protobuf}/include"; - ROCKSDB_INCLUDE_DIR = "${rocksdb}/include"; - ROCKSDB_LIB_DIR = "${rocksdb}/lib"; + ROCKSDB_INCLUDE_DIR = "${rocksdb}/include"; + ROCKSDB_LIB_DIR = "${rocksdb}/lib"; - RUSTFLAGS = "--cfg surrealdb_unstable"; + RUSTFLAGS = "--cfg surrealdb_unstable"; + }; nativeBuildInputs = [ pkg-config From ef55e0656664714caebb139ae24224703f22be0c Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:40 +0100 Subject: [PATCH 20/28] tokio-console: move RUSTFLAGS env variables into env for structuredAttrs Also fix checkFlags for structuredAttrs --- pkgs/by-name/to/tokio-console/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/to/tokio-console/package.nix b/pkgs/by-name/to/tokio-console/package.nix index daafce25d061..f57ef2d3f986 100644 --- a/pkgs/by-name/to/tokio-console/package.nix +++ b/pkgs/by-name/to/tokio-console/package.nix @@ -28,13 +28,13 @@ rustPlatform.buildRustPackage rec { ]; # uses currently unstable tokio features - RUSTFLAGS = "--cfg tokio_unstable"; + env.RUSTFLAGS = "--cfg tokio_unstable"; checkFlags = [ # tests depend upon git repository at test execution time - "--skip bootstrap" - "--skip config::tests::args_example_changed" - "--skip config::tests::toml_example_changed" + "--skip=bootstrap" + "--skip=config::tests::args_example_changed" + "--skip=config::tests::toml_example_changed" ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' From ef4a25368e63cfa7dbaf422c86efbd1093a0725c Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:40 +0100 Subject: [PATCH 21/28] trojan-rs: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/tr/trojan-rs/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/tr/trojan-rs/package.nix b/pkgs/by-name/tr/trojan-rs/package.nix index 422db3cbc707..371a88292d7a 100644 --- a/pkgs/by-name/tr/trojan-rs/package.nix +++ b/pkgs/by-name/tr/trojan-rs/package.nix @@ -21,8 +21,10 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ rustPlatform.bindgenHook ]; buildInputs = [ ipset ]; - env.RUSTC_BOOTSTRAP = true; - env.RUSTFLAGS = "--cfg tokio_unstable"; + env = { + RUSTC_BOOTSTRAP = true; + RUSTFLAGS = "--cfg tokio_unstable"; + }; meta = { homepage = "https://github.com/lazytiger/trojan-rs"; From 4c72d22fbc18a9320ff019dc18030044a1dd8496 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:41 +0100 Subject: [PATCH 22/28] veilid: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/ve/veilid/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ve/veilid/package.nix b/pkgs/by-name/ve/veilid/package.nix index 3e6f80b4e028..42da59a32f08 100644 --- a/pkgs/by-name/ve/veilid/package.nix +++ b/pkgs/by-name/ve/veilid/package.nix @@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec { "--workspace" ]; - RUSTFLAGS = "--cfg tokio_unstable"; + env.RUSTFLAGS = "--cfg tokio_unstable"; doCheck = false; From 4509d4b0fbe106e7b08371620b3c92aac7ba649b Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:41 +0100 Subject: [PATCH 23/28] warpgate: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/wa/warpgate/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/wa/warpgate/package.nix b/pkgs/by-name/wa/warpgate/package.nix index c48ec8265167..9834b3c86cd4 100644 --- a/pkgs/by-name/wa/warpgate/package.nix +++ b/pkgs/by-name/wa/warpgate/package.nix @@ -50,7 +50,7 @@ rustPlatform.buildRustPackage ( (replaceVars ./hardcode-version.patch { inherit (finalAttrs) version; }) ]; - RUSTFLAGS = "--cfg tokio_unstable"; + env.RUSTFLAGS = "--cfg tokio_unstable"; buildFeatures = [ "postgres" From 13eb46a180330b88f071d3aee4a8019e4388fa86 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:41 +0100 Subject: [PATCH 24/28] way-edges: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/wa/way-edges/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/wa/way-edges/package.nix b/pkgs/by-name/wa/way-edges/package.nix index 9b587e5c5cd4..0495e54e8991 100644 --- a/pkgs/by-name/wa/way-edges/package.nix +++ b/pkgs/by-name/wa/way-edges/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage (finalAttrs: { libpulseaudio ]; - RUSTFLAGS = [ + env.RUSTFLAGS = toString [ "--cfg tokio_unstable" "--cfg tokio_uring" ]; From f4081862ed9c2db44b09323c810a4b30c83d5990 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:41 +0100 Subject: [PATCH 25/28] wprs: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/wp/wprs/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/wp/wprs/package.nix b/pkgs/by-name/wp/wprs/package.nix index 9643140ca8d5..dd349cca0c22 100644 --- a/pkgs/by-name/wp/wprs/package.nix +++ b/pkgs/by-name/wp/wprs/package.nix @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage { cargoHash = "sha256-krrVgdoCcW3voSiQAoWsG+rPf1HYKbuGhplhn21as2c="; - RUSTFLAGS = "-C target-feature=+avx2"; # only works on x86 systems supporting AVX2 + env.RUSTFLAGS = "-C target-feature=+avx2"; # only works on x86 systems supporting AVX2 preFixup = '' cp wprs "$out/bin/wprs" From 64e28411d232dfcaab55b34a92c877a02362c973 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:56:42 +0100 Subject: [PATCH 26/28] zed-editor: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/by-name/ze/zed-editor/package.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index aed007f98beb..c3c60fb1ee1a 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -208,10 +208,9 @@ rustPlatform.buildRustPackage (finalAttrs: { # Used by `zed --version` RELEASE_VERSION = finalAttrs.version; LK_CUSTOM_WEBRTC = livekit-libwebrtc; + RUSTFLAGS = lib.optionalString withGLES "--cfg gles"; }; - RUSTFLAGS = lib.optionalString withGLES "--cfg gles"; - preBuild = '' bash script/generate-licenses ''; From a4f31590135acc70b4f098552d239088814073cb Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:57:03 +0100 Subject: [PATCH 27/28] rust-hypervisor-firmware: move RUSTFLAGS env variables into env for structuredAttrs --- .../virtualization/rust-hypervisor-firmware/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix b/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix index 5e97d14d7aca..0e68a1108319 100644 --- a/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix +++ b/pkgs/applications/virtualization/rust-hypervisor-firmware/default.nix @@ -44,14 +44,15 @@ rustPlatform.buildRustPackage rec { # https://github.com/cloud-hypervisor/rust-hypervisor-firmware/issues/249 auditable = false; - RUSTC_BOOTSTRAP = 1; + env = { + RUSTC_BOOTSTRAP = 1; + RUSTFLAGS = "-C linker=lld -C linker-flavor=ld.lld"; + }; nativeBuildInputs = [ lld ]; - RUSTFLAGS = "-C linker=lld -C linker-flavor=ld.lld"; - # Tests don't work for `no_std`. See https://os.phil-opp.com/testing/ doCheck = false; From b4088bcecb587cf9c4cdfbd7c36c3356faf1b177 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 31 Dec 2025 10:57:30 +0100 Subject: [PATCH 28/28] python3Modules.mitmproxy-linux: move RUSTFLAGS env variables into env for structuredAttrs --- pkgs/development/python-modules/mitmproxy-linux/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mitmproxy-linux/default.nix b/pkgs/development/python-modules/mitmproxy-linux/default.nix index 0dd4551a55e4..342ef131b55b 100644 --- a/pkgs/development/python-modules/mitmproxy-linux/default.nix +++ b/pkgs/development/python-modules/mitmproxy-linux/default.nix @@ -26,8 +26,10 @@ buildPythonPackage { patch -p1 < tmp.diff ''; - RUSTFLAGS = "-C target-feature="; - RUSTC_BOOTSTRAP = 1; + env = { + RUSTFLAGS = "-C target-feature="; + RUSTC_BOOTSTRAP = 1; + }; buildAndTestSubdir = "mitmproxy-linux";