From 454b2058d48b687cc874738f7a2b2c50d84fdd89 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 9 May 2023 17:44:54 +0000 Subject: [PATCH] rustc: fix name when cross compiled I made a mistake when trying to add the target prefix to Rust cross compilers: pkgsCross.aarch64-multiplatform.rustc ended up being called "aarch64-unknown-linux-gnu-rustc-aarch64-unknown-linux-gnu-1.69.0", which is a bit verbose. With this change: nix-repl> rustc.name "rustc-1.69.0" nix-repl> pkgsCross.aarch64-multiplatform.buildPackages.rustc.name "aarch64-unknown-linux-gnu-rustc-1.69.0" nix-repl> pkgsCross.aarch64-multiplatform.rustc.name "rustc-aarch64-unknown-linux-gnu-1.69.0" As intended. Fixes: 57e73d23bb6 ("rustc,rustPlatform.buildRustPackage: broaden platforms") --- pkgs/development/compilers/rust/rustc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index a8e8cf68fe3a..fc43cfe2e265 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget +{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, targetPackages , llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackages , fetchurl, file, python3 , darwin, cmake, rust, rustPlatform @@ -21,7 +21,7 @@ let inherit (lib) optionals optional optionalString concatStringsSep; inherit (darwin.apple_sdk.frameworks) Security; in stdenv.mkDerivation rec { - pname = "${pkgsBuildTarget.targetPackages.stdenv.cc.targetPrefix}rustc"; + pname = "${targetPackages.stdenv.cc.targetPrefix}rustc"; inherit version; src = fetchurl {