From 783fa4616e044ca33e4841514a180ad1325b48d4 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 12 Mar 2020 09:56:55 -0400 Subject: [PATCH] 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. --- pkgs/development/compilers/rust/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index da3421a987da..7dc30f48c50a 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 = {