diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/rust/build-rust-crate/configure-crate.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/rust/build-rust-crate/configure-crate.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/nixpkgs/pkgs/build-support/rust/build-rust-crate/configure-crate.nix index 8e2f5f7f35e0..c7cffd42e087 100644 --- a/nixpkgs/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/nixpkgs/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, echo_colored, noisily, mkRustcDepArgs, mkRustcFeatureArgs }: +{ lib, stdenv, rust, echo_colored, noisily, mkRustcDepArgs, mkRustcFeatureArgs }: { build , buildDependencies @@ -17,7 +17,6 @@ , libName , libPath , release -, target_os , verbose , workspace_member }: let version_ = lib.splitString "-" crateVersion; @@ -124,8 +123,8 @@ in '' export CARGO_PKG_AUTHORS="${authors}" export CARGO_PKG_DESCRIPTION="${crateDescription}" - export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name} - export CARGO_CFG_TARGET_OS=${target_os} + export CARGO_CFG_TARGET_ARCH=${rust.toTargetArch stdenv.hostPlatform} + export CARGO_CFG_TARGET_OS=${rust.toTargetOs stdenv.hostPlatform} export CARGO_CFG_TARGET_FAMILY="unix" export CARGO_CFG_UNIX=1 export CARGO_CFG_TARGET_ENV="gnu" @@ -136,8 +135,8 @@ in '' export CARGO_MANIFEST_DIR=$(pwd) export DEBUG="${toString (!release)}" export OPT_LEVEL="${toString optLevel}" - export TARGET="${stdenv.hostPlatform.config}" - export HOST="${stdenv.hostPlatform.config}" + export TARGET="${rust.toRustTarget stdenv.hostPlatform}" + export HOST="${rust.toRustTarget stdenv.buildPlatform}" export PROFILE=${if release then "release" else "debug"} export OUT_DIR=$(pwd)/target/build/${crateName}.out export CARGO_PKG_VERSION_MAJOR=${lib.elemAt version 0} |