diff --git a/pkgs/by-name/ai/airshipper/package.nix b/pkgs/by-name/ai/airshipper/package.nix index aba284758545..4731be7ce016 100644 --- a/pkgs/by-name/ai/airshipper/package.nix +++ b/pkgs/by-name/ai/airshipper/package.nix @@ -87,7 +87,7 @@ rustPlatform.buildRustPackage { makeWrapper ]; - RUSTC_BOOTSTRAP = 1; # We need rust unstable features + env.RUSTC_BOOTSTRAP = 1; # We need rust unstable features postInstall = '' install -Dm444 -t "$out/share/applications" "client/assets/net.veloren.airshipper.desktop" diff --git a/pkgs/by-name/ce/celeste/package.nix b/pkgs/by-name/ce/celeste/package.nix index 911d3f54429a..e3535bf41e09 100644 --- a/pkgs/by-name/ce/celeste/package.nix +++ b/pkgs/by-name/ce/celeste/package.nix @@ -54,7 +54,7 @@ rustPlatform.buildRustPackage rec { --replace-warn 'edition = "2021"' 'edition = "2024"' ''; - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; nativeBuildInputs = [ just diff --git a/pkgs/by-name/cn/cnsprcy/package.nix b/pkgs/by-name/cn/cnsprcy/package.nix index 662df4a1f5ca..4e4f8778bef4 100644 --- a/pkgs/by-name/cn/cnsprcy/package.nix +++ b/pkgs/by-name/cn/cnsprcy/package.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage (finalAttrs: { passthru.updateScript = ./update.sh; - RUSTC_BOOTSTRAP = true; + env.RUSTC_BOOTSTRAP = true; buildInputs = [ sqlite ]; meta = { diff --git a/pkgs/by-name/ew/eww/package.nix b/pkgs/by-name/ew/eww/package.nix index 9f8739ea741f..8656401e6a45 100644 --- a/pkgs/by-name/ew/eww/package.nix +++ b/pkgs/by-name/ew/eww/package.nix @@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec { cargoTestFlags = cargoBuildFlags; # requires unstable rust features - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd eww \ diff --git a/pkgs/by-name/fr/freshfetch/package.nix b/pkgs/by-name/fr/freshfetch/package.nix index dd6b7510d7b9..d61bbb398d22 100644 --- a/pkgs/by-name/fr/freshfetch/package.nix +++ b/pkgs/by-name/fr/freshfetch/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-LKltHVig33zUSWoRgCb1BgeKiJsDnlYEuPfQfrnhafI="; # freshfetch depends on rust nightly features - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; meta = { description = "Fresh take on neofetch"; diff --git a/pkgs/by-name/fu/fuc/package.nix b/pkgs/by-name/fu/fuc/package.nix index 6175f66772b3..bb6632c0f710 100644 --- a/pkgs/by-name/fu/fuc/package.nix +++ b/pkgs/by-name/fu/fuc/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-OoTWGeF96BpPDx1Y9AEVOIBK7kCz6pjw24pLiNcKmOc="; - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; cargoBuildFlags = [ "--workspace" diff --git a/pkgs/by-name/hi/highlight-assertions/package.nix b/pkgs/by-name/hi/highlight-assertions/package.nix index 50d48e31db33..4f03a55c63a6 100644 --- a/pkgs/by-name/hi/highlight-assertions/package.nix +++ b/pkgs/by-name/hi/highlight-assertions/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-egrxcnDVKKgk1sL5WNMIR2FPwQbjjMy20VWizcTBEtM="; # requires nightly features - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; meta = { description = "Tool for unit testing tree sitter highlights for nvim-treesitter"; diff --git a/pkgs/by-name/ho/holo-cli/package.nix b/pkgs/by-name/ho/holo-cli/package.nix index 44dc53470480..e3efcf600528 100644 --- a/pkgs/by-name/ho/holo-cli/package.nix +++ b/pkgs/by-name/ho/holo-cli/package.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage (finalAttrs: { passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; # Use rust nightly features - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; nativeBuildInputs = [ cmake diff --git a/pkgs/by-name/ho/holo-daemon/package.nix b/pkgs/by-name/ho/holo-daemon/package.nix index c71f737c54f8..10b86b93b7a1 100644 --- a/pkgs/by-name/ho/holo-daemon/package.nix +++ b/pkgs/by-name/ho/holo-daemon/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-YZ2c6W6CCqgyN+6i7Vh5fWLKw8L4pUqvq/tDO/Q/kf0="; # Use rust nightly features - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; nativeBuildInputs = [ cmake diff --git a/pkgs/by-name/ki/kind2/package.nix b/pkgs/by-name/ki/kind2/package.nix index 34ae627b4597..c571fd6d0058 100644 --- a/pkgs/by-name/ki/kind2/package.nix +++ b/pkgs/by-name/ki/kind2/package.nix @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec { ''; # requires nightly features - RUSTC_BOOTSTRAP = true; + env.RUSTC_BOOTSTRAP = true; meta = { description = "Functional programming language and proof assistant"; diff --git a/pkgs/by-name/ko/kord/package.nix b/pkgs/by-name/ko/kord/package.nix index ad3862b6f54f..682215044f71 100644 --- a/pkgs/by-name/ko/kord/package.nix +++ b/pkgs/by-name/ko/kord/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { version = "0.6.1"; # kord depends on nightly features - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; src = fetchFromGitHub { owner = "twitchax"; diff --git a/pkgs/by-name/ms/msedit/package.nix b/pkgs/by-name/ms/msedit/package.nix index 8b9a2ed13745..3319b3e30d9a 100644 --- a/pkgs/by-name/ms/msedit/package.nix +++ b/pkgs/by-name/ms/msedit/package.nix @@ -19,14 +19,18 @@ rustPlatform.buildRustPackage (finalAttrs: { }; cargoHash = "sha256-U8U70nzTmpY6r8J661EJ4CGjx6vWrGovu5m25dvz5sY="; - # Requires nightly features - env.RUSTC_BOOTSTRAP = 1; - # Without -headerpad, the following error occurs on x86_64-darwin - # error: install_name_tool: changing install names or rpaths can't be redone for: ... because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names) - NIX_LDFLAGS = lib.optionals (with stdenv.hostPlatform; isDarwin && isx86_64) [ - "-headerpad_max_install_names" - ]; + # Requires nightly features + env = { + RUSTC_BOOTSTRAP = 1; + # Without -headerpad, the following error occurs on x86_64-darwin + # error: install_name_tool: changing install names or rpaths can't be redone for: ... because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names) + NIX_LDFLAGS = toString ( + lib.optionals (with stdenv.hostPlatform; isDarwin && isx86_64) [ + "-headerpad_max_install_names" + ] + ); + }; buildInputs = [ icu diff --git a/pkgs/by-name/ni/nix-ld/package.nix b/pkgs/by-name/ni/nix-ld/package.nix index 3c69baf06241..8290aaa03212 100644 --- a/pkgs/by-name/ni/nix-ld/package.nix +++ b/pkgs/by-name/ni/nix-ld/package.nix @@ -21,8 +21,10 @@ rustPlatform.buildRustPackage rec { hardeningDisable = [ "stackprotector" ]; - NIX_SYSTEM = stdenv.system; - RUSTC_BOOTSTRAP = "1"; + env = { + NIX_SYSTEM = stdenv.system; + RUSTC_BOOTSTRAP = "1"; + }; preCheck = '' export NIX_LD=${stdenv.cc.bintools.dynamicLinker} diff --git a/pkgs/by-name/sh/shadow-tls/package.nix b/pkgs/by-name/sh/shadow-tls/package.nix index 960372fdf6b5..f985456e6329 100644 --- a/pkgs/by-name/sh/shadow-tls/package.nix +++ b/pkgs/by-name/sh/shadow-tls/package.nix @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-1oJCdqBa1pWpQ7QvZ0vZaOd73R+SzR9OPf+yoI+RwCY="; - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; # network required doCheck = false; diff --git a/pkgs/by-name/sy/syndicate-server/package.nix b/pkgs/by-name/sy/syndicate-server/package.nix index 025b446e0e81..4f6219b3596a 100644 --- a/pkgs/by-name/sy/syndicate-server/package.nix +++ b/pkgs/by-name/sy/syndicate-server/package.nix @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { ]; buildInputs = [ openssl ]; - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; doCheck = false; doInstallCheck = true; diff --git a/pkgs/by-name/un/unpfs/package.nix b/pkgs/by-name/un/unpfs/package.nix index 4cf96dbdd0de..99d7d9662bdf 100644 --- a/pkgs/by-name/un/unpfs/package.nix +++ b/pkgs/by-name/un/unpfs/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-jRe1lgzfhzBUsS6wwwlqxxomap2TIDOyF3YBv20GJ14="; - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; postInstall = '' install -D -m 0444 ../../README* -t "$out/share/doc/${pname}" diff --git a/pkgs/development/compilers/rust/clippy.nix b/pkgs/development/compilers/rust/clippy.nix index fa33c9e9f315..e5f1b3544f0b 100644 --- a/pkgs/development/compilers/rust/clippy.nix +++ b/pkgs/development/compilers/rust/clippy.nix @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage { buildInputs = [ rustc.llvm ]; # fixes: error: the option `Z` is only accepted on the nightly compiler - RUSTC_BOOTSTRAP = 1; + env.RUSTC_BOOTSTRAP = 1; # Without disabling the test the build fails with: # error: failed to run custom build command for `rustc_llvm v0.0.0 diff --git a/pkgs/development/compilers/rust/rustfmt.nix b/pkgs/development/compilers/rust/rustfmt.nix index b002d665518a..0398dcc9fe0a 100644 --- a/pkgs/development/compilers/rust/rustfmt.nix +++ b/pkgs/development/compilers/rust/rustfmt.nix @@ -38,13 +38,15 @@ rustPlatform.buildRustPackage { install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/git-rustfmt" ''; - # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler - RUSTC_BOOTSTRAP = 1; + env = { + # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler + RUSTC_BOOTSTRAP = 1; - # As of rustc 1.45.0, these env vars are required to build rustfmt (due to - # https://github.com/rust-lang/rust/pull/72001) - CFG_RELEASE = rustc.version; - CFG_RELEASE_CHANNEL = if asNightly then "nightly" else "stable"; + # As of rustc 1.45.0, these env vars are required to build rustfmt (due to + # https://github.com/rust-lang/rust/pull/72001) + CFG_RELEASE = rustc.version; + CFG_RELEASE_CHANNEL = if asNightly then "nightly" else "stable"; + }; postInstall = '' wrapProgram $out/bin/cargo-fmt \