From d89c29deb8ae6baa96443caa3857c2039b3ab86d Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Wed, 18 Aug 2021 15:45:28 +0200 Subject: [PATCH 1/2] rust.toRustTarget: fix for windows change vendor from "w64" to "pc" broken since 91718534f1f476a727b51a256c93885e57cf602d --- pkgs/development/compilers/rust/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index fee21023c4c2e..3e6f3a044fb42 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -38,8 +38,11 @@ "armv5tel" = "armv5te"; "riscv64" = "riscv64gc"; }.${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. From 3bdfca449103c4ba7fe42c1a47454f2b6ef9b753 Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Fri, 20 Aug 2021 12:46:05 +0200 Subject: [PATCH 2/2] buildRustPackage: remove unused parameter --- pkgs/build-support/rust/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 58b91b88e80bd..2eb45bcafa131 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -10,7 +10,6 @@ , importCargoLock , rustPlatform , callPackage -, remarshal , git , rust , rustc