summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2021-09-28 09:37:55 +0100
committerGitHub <noreply@github.com>2021-09-28 09:37:55 +0100
commit96bf839ef6b7a8b00b064630e7d5c50c4d4981a4 (patch)
tree0920a8dacf4f72b44684ae718e0712d08f7e95c3
parentMerge pull request #139238 from Ma27/backport-hedgedoc (diff)
parentrust.toRustTarget: fix for windows (diff)
downloadnixpkgs-96bf839ef6b7a8b00b064630e7d5c50c4d4981a4.tar.gz
Merge pull request #139697 from oxalica/bp/fix/to-rust-target
[21.05] fix toRustTarget for windows
-rw-r--r--pkgs/development/compilers/rust/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index c90f689e21cc..b48791f11b7c 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -37,8 +37,11 @@
"armv6l" = "arm";
"armv5tel" = "armv5te";
}.${cpu.name} or cpu.name;
+ vendor_ = platform.rustc.platform.vendor or {
+ "w64" = "pc";
+ }.${vendor.name} or vendor.name;
in platform.rustc.config
- or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
+ or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
# Returns the name of the rust target if it is standard, or the json file
# containing the custom target spec.