From 88f8b20419e82e5f83743232e9d592f6a30cd137 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 7 Jan 2024 14:20:45 +0000 Subject: [PATCH] llvmPackages.bintools.bintools: expose `targetPrefix` attribute to match `binutils` Before the change `llvmPackages.bintools.bintools.targetPrefix` was not present. This exposed as a discrepansy between `binutils` and `llvm`: `binutils`: nix-repl> stdenv.cc.bintools.bintools.targetPrefix "" nix-repl> stdenv.cc.bintools.targetPrefix "" `llvm`: nix-repl> pkgsLLVM.stdenv.cc.bintools.targetPrefix "x86_64-unknown-linux-gnu-" nix-repl> pkgsLLVM.stdenv.cc.bintools.bintools.targetPrefix error: error: attribute 'targetPrefix' missing As a result some attributes like `pkgsLLVM.actionlint` failed to evaluate: $ nix build --no-link -f. pkgsLLVM.actionlint ... error: attribute 'targetPrefix' missing at pkgs/development/compilers/ghc/9.4.8.nix:232:46: 231| export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" 232| export STRIP="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip" | ^ The change exposes binary prefix the same way as `binutils` does. --- pkgs/development/compilers/llvm/common/bintools.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/common/bintools.nix b/pkgs/development/compilers/llvm/common/bintools.nix index a60060e86891..85b570d976ae 100644 --- a/pkgs/development/compilers/llvm/common/bintools.nix +++ b/pkgs/development/compilers/llvm/common/bintools.nix @@ -8,6 +8,7 @@ runCommand "llvm-binutils-${version}" preferLocalBuild = true; passthru = { isLLVM = true; + inherit targetPrefix; }; } (''