Revert "treewide: prepare Rust packages for structuredAttrs by putting variables in env" (#477988)

This commit is contained in:
K900
2026-01-08 07:42:38 +00:00
committed by GitHub
21 changed files with 45 additions and 57 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ rustPlatform.buildRustPackage {
makeWrapper
];
env.RUSTC_BOOTSTRAP = 1; # We need rust unstable features
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"'
'';
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
nativeBuildInputs = [
just
+1 -1
View File
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
passthru.updateScript = ./update.sh;
env.RUSTC_BOOTSTRAP = true;
RUSTC_BOOTSTRAP = true;
buildInputs = [ sqlite ];
meta = {
+1 -1
View File
@@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec {
cargoTestFlags = cargoBuildFlags;
# requires unstable rust features
env.RUSTC_BOOTSTRAP = 1;
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
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
meta = {
description = "Fresh take on neofetch";
+1 -1
View File
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-OoTWGeF96BpPDx1Y9AEVOIBK7kCz6pjw24pLiNcKmOc=";
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
cargoBuildFlags = [
"--workspace"
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-egrxcnDVKKgk1sL5WNMIR2FPwQbjjMy20VWizcTBEtM=";
# requires nightly features
env.RUSTC_BOOTSTRAP = 1;
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
env.RUSTC_BOOTSTRAP = 1;
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
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
nativeBuildInputs = [
cmake
+2 -4
View File
@@ -34,10 +34,8 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-UcS2gAoa2fzPu6hh8I5sXSHHbAmzsecT44Ju2CVsK0Q=";
env = {
RUSTC_BOOTSTRAP = 1;
RUSTFLAGS = "--cfg=web_sys_unstable_apis";
};
RUSTC_BOOTSTRAP = 1;
RUSTFLAGS = "--cfg=web_sys_unstable_apis";
nativeBuildInputs = [
wasm-bindgen-cli_0_2_100
+1 -1
View File
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage rec {
'';
# requires nightly features
env.RUSTC_BOOTSTRAP = true;
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
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
src = fetchFromGitHub {
owner = "twitchax";
+7 -11
View File
@@ -19,18 +19,14 @@ 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 = toString (
lib.optionals (with stdenv.hostPlatform; isDarwin && isx86_64) [
"-headerpad_max_install_names"
]
);
};
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"
];
buildInputs = [
icu
+2 -4
View File
@@ -21,10 +21,8 @@ rustPlatform.buildRustPackage rec {
hardeningDisable = [ "stackprotector" ];
env = {
NIX_SYSTEM = stdenv.system;
RUSTC_BOOTSTRAP = "1";
};
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=";
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
# network required
doCheck = false;
+1 -1
View File
@@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
];
buildInputs = [ openssl ];
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
doCheck = false;
doInstallCheck = true;
+1 -1
View File
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-jRe1lgzfhzBUsS6wwwlqxxomap2TIDOyF3YBv20GJ14=";
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
postInstall = ''
install -D -m 0444 ../../README* -t "$out/share/doc/${pname}"
+11 -11
View File
@@ -55,19 +55,19 @@ rustPlatform.buildRustPackage.override
zlib
];
env = {
# cargo uses git-rs which is made for a version of libgit2 from recent master that
# is not compatible with the current version in nixpkgs.
#LIBGIT2_SYS_USE_PKG_CONFIG = 1;
# cargo uses git-rs which is made for a version of libgit2 from recent master that
# is not compatible with the current version in nixpkgs.
#LIBGIT2_SYS_USE_PKG_CONFIG = 1;
# fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel
RUSTC_BOOTSTRAP = 1;
# fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel
RUSTC_BOOTSTRAP = 1;
}
// lib.optionalAttrs (stdenv.hostPlatform.rust.rustcTargetSpec == "x86_64-unknown-linux-gnu") {
# Upstream defaults to lld on x86_64-unknown-linux-gnu, we want to use our linker
RUSTFLAGS = "-Clinker-features=-lld -Clink-self-contained=-linker";
};
RUSTFLAGS =
if stdenv.hostPlatform.rust.rustcTargetSpec == "x86_64-unknown-linux-gnu" then
# Upstream defaults to lld on x86_64-unknown-linux-gnu, we want to use our linker
"-Clinker-features=-lld -Clink-self-contained=-linker"
else
null;
postInstall = ''
wrapProgram "$out/bin/cargo" --suffix PATH : "${rustc}/bin"
+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
env.RUSTC_BOOTSTRAP = 1;
RUSTC_BOOTSTRAP = 1;
# Without disabling the test the build fails with:
# error: failed to run custom build command for `rustc_llvm v0.0.0
+6 -8
View File
@@ -38,15 +38,13 @@ rustPlatform.buildRustPackage {
install_name_tool -add_rpath "${rustc.unwrapped}/lib" "$out/bin/git-rustfmt"
'';
env = {
# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
RUSTC_BOOTSTRAP = 1;
# 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 \
@@ -26,10 +26,8 @@ buildPythonPackage {
patch -p1 < tmp.diff
'';
env = {
RUSTFLAGS = "-C target-feature=";
RUSTC_BOOTSTRAP = 1;
};
RUSTFLAGS = "-C target-feature=";
RUSTC_BOOTSTRAP = 1;
buildAndTestSubdir = "mitmproxy-linux";