treewide: prepare Rust packages for structuredAttrs by putting variables in env (#478053)

This commit is contained in:
Wolfgang Walther
2026-01-09 21:15:29 +00:00
committed by GitHub
18 changed files with 38 additions and 30 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -54,7 +54,7 @@ rustPlatform.buildRustPackage rec {
--replace-warn 'edition = "2021"' 'edition = "2024"'
'';
RUSTC_BOOTSTRAP = 1;
env.RUSTC_BOOTSTRAP = 1;
nativeBuildInputs = [
just
+1 -1
View File
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
passthru.updateScript = ./update.sh;
RUSTC_BOOTSTRAP = true;
env.RUSTC_BOOTSTRAP = true;
buildInputs = [ sqlite ];
meta = {
+1 -1
View File
@@ -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 \
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-OoTWGeF96BpPDx1Y9AEVOIBK7kCz6pjw24pLiNcKmOc=";
RUSTC_BOOTSTRAP = 1;
env.RUSTC_BOOTSTRAP = 1;
cargoBuildFlags = [
"--workspace"
@@ -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";
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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";
+11 -7
View File
@@ -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
+4 -2
View File
@@ -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}
+1 -1
View File
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-1oJCdqBa1pWpQ7QvZ0vZaOd73R+SzR9OPf+yoI+RwCY=";
RUSTC_BOOTSTRAP = 1;
env.RUSTC_BOOTSTRAP = 1;
# network required
doCheck = false;
+1 -1
View File
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
];
buildInputs = [ openssl ];
RUSTC_BOOTSTRAP = 1;
env.RUSTC_BOOTSTRAP = 1;
doCheck = false;
doInstallCheck = true;
+1 -1
View File
@@ -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}"
+1 -1
View File
@@ -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
+8 -6
View File
@@ -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 \