treewide: move CARGO_* env vars into env for structuredAttrs (#491382)
This commit is contained in:
@@ -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" ];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
cargoHash = "sha256-08pvkBa2PD7/uko1OOBg6/dCcOM3z9Cp//8mylFCMcE=";
|
||||
|
||||
CARGO_CRATE_NAME = "mhost";
|
||||
env.CARGO_CRATE_NAME = "mhost";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user