treewide: move CARGO_* env vars into env for structuredAttrs (#491382)

This commit is contained in:
Yohann Boniface
2026-02-18 21:36:30 +00:00
committed by GitHub
8 changed files with 20 additions and 12 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
wrapProgram $out/bin/cargo-lambda --prefix PATH : ${lib.makeBinPath [ zig_0_13 ]}
'';
CARGO_LAMBDA_BUILD_INFO = "(nixpkgs)";
env.CARGO_LAMBDA_BUILD_INFO = "(nixpkgs)";
cargoBuildFlags = [ "--features=skip-build-banner" ];
cargoCheckFlags = [ "--features=skip-build-banner" ];
+4 -2
View File
@@ -20,8 +20,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
buildAndTestSubdir = "crates/codebook-lsp";
cargoHash = "sha256-hxPgYGBq+KZfEyFiHQG31cNEN6A6hUgKRgZXIHOGalw=";
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
env = {
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
};
# Integration tests require internet access for dictionaries
doCheck = false;
+1 -1
View File
@@ -78,7 +78,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
zlib
];
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = "gcc";
env.CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = "gcc";
preBuild = ''
# `SANDBOX` defined by upstream to disable build-time network access
+1 -1
View File
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-08pvkBa2PD7/uko1OOBg6/dCcOM3z9Cp//8mylFCMcE=";
CARGO_CRATE_NAME = "mhost";
env.CARGO_CRATE_NAME = "mhost";
doCheck = false;
+4 -2
View File
@@ -22,8 +22,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-v+OfQEfAwHxX+FfC0UK2F8/e2tJKaI3zQpg+3hk2hV4=";
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
env = {
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
+4 -2
View File
@@ -58,8 +58,10 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonBool "gfxstream" withGfxstream)
];
CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
"CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_LINKER" = "${stdenv.cc.targetPrefix}cc";
env = {
CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
"CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_LINKER" = "${stdenv.cc.targetPrefix}cc";
};
preConfigure = ''
cd rutabaga_gfx/ffi
+1 -1
View File
@@ -23,7 +23,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
buildInputs = [ openssl ];
CARGO_FEATURE_USE_SYSTEM_LIBS = true;
env.CARGO_FEATURE_USE_SYSTEM_LIBS = true;
meta = {
description = "Modern Prolog implementation written mostly in Rust";
+4 -2
View File
@@ -22,8 +22,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
cargoHash = "sha256-ihNFGlPhPLCIDvFnMqKA+flD/mv9wcKgQ1txO71xOp4=";
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
env = {
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
};
nativeBuildInputs = [
installShellFiles