diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/rust/build-rust-package')
-rw-r--r-- | nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix | 8 | ||||
-rw-r--r-- | nixpkgs/pkgs/build-support/rust/build-rust-package/sysroot/default.nix | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix b/nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix index 8b87bcbee3af..8707ce084705 100644 --- a/nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix +++ b/nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix @@ -1,7 +1,6 @@ { lib , importCargoLock , fetchCargoTarball -, rust , stdenv , callPackage , cargoBuildHook @@ -80,13 +79,13 @@ let sha256 = args.cargoSha256; } // depsExtraArgs); - target = rust.toRustTargetSpec stdenv.hostPlatform; + target = stdenv.hostPlatform.rust.rustcTargetSpec; targetIsJSON = lib.hasSuffix ".json" target; useSysroot = targetIsJSON && !__internal_dontAddSysroot; sysroot = callPackage ./sysroot { } { inherit target; - shortTarget = rust.lib.toRustTargetSpecShort stdenv.hostPlatform; + shortTarget = stdenv.hostPlatform.rust.cargoShortTarget; RUSTFLAGS = args.RUSTFLAGS or ""; originalCargoToml = src + /Cargo.toml; # profile info is later extracted }; @@ -158,7 +157,8 @@ let # Platforms without host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "armv7a-darwin" - "armv5tel-linux" "armv7a-linux" "m68k-linux" "riscv32-linux" + "armv5tel-linux" "armv7a-linux" "m68k-linux" "mipsel-linux" + "mips64el-linux" "riscv32-linux" "armv6l-netbsd" "x86_64-redox" "wasm32-wasi" diff --git a/nixpkgs/pkgs/build-support/rust/build-rust-package/sysroot/default.nix b/nixpkgs/pkgs/build-support/rust/build-rust-package/sysroot/default.nix index a6d53056d9c7..bb95b7bdc35c 100644 --- a/nixpkgs/pkgs/build-support/rust/build-rust-package/sysroot/default.nix +++ b/nixpkgs/pkgs/build-support/rust/build-rust-package/sysroot/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, rust, rustPlatform, buildPackages }: +{ lib, stdenv, rustPlatform, buildPackages }: { shortTarget, originalCargoToml, target, RUSTFLAGS }: @@ -26,7 +26,7 @@ in rustPlatform.buildRustPackage { done export RUST_SYSROOT=$(rustc --print=sysroot) - host=${rust.toRustTarget stdenv.buildPlatform} + host=${stdenv.buildPlatform.rust.rustcTarget} cp -r $RUST_SYSROOT/lib/rustlib/$host $out ''; |