summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-03-12 09:56:55 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-03-12 09:56:55 -0400
commit783fa4616e044ca33e4841514a180ad1325b48d4 (patch)
tree05218fdc2e6b05f1f6bb7c31a1f1a9b4302138ac /pkgs/development/compilers
parent00afca09295db93bf8bffe3f6f2d92a74eb97b38 (diff)
downloadnixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.tar
nixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.tar.gz
nixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.tar.bz2
nixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.tar.lz
nixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.tar.xz
nixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.tar.zst
nixpkgs-783fa4616e044ca33e4841514a180ad1325b48d4.zip
rustc: Add way to override the arch and config triple for rust
Sometimes it is useful for it to be slightly different. Going forward we
should, however, try to make this fallback rarely needed.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/rust/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index da3421a987d..7dc30f48c50 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -17,8 +17,9 @@
       "armv7a" = "armv7";
       "armv7l" = "armv7";
       "armv6l" = "arm";
-    }.${cpu.name} or cpu.name;
-  in "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
+    }.${cpu.name} or platform.rustc.arch or cpu.name;
+  in platform.rustc.config
+    or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
 
   makeRustPlatform = { rustc, cargo, ... }: rec {
     rust = {