autoPatchelfHook: fix packages that use stdenvNoCC

autoPatchelfHook actually doesn't depend on stdenv and only needs
bintools (with its wrapper). This change uses $NIX_BINTOOLS instead of
$NIX_CC and makes the dependency on bintools explicit.
This commit is contained in:
Noah Fontes 2021-09-17 13:40:27 -07:00
parent 4765a3e153
commit a7f5e8321e
No known key found for this signature in database
GPG key ID: 85B8C0A0B15FF53F
2 changed files with 4 additions and 3 deletions

View file

@ -206,7 +206,7 @@ autoPatchelfFile() {
local dep rpath="" toPatch="$1"
local interpreter
interpreter="$(< "$NIX_CC/nix-support/dynamic-linker")"
interpreter="$(< "$NIX_BINTOOLS/nix-support/dynamic-linker")"
local interpreterArch interpreterOsabi toPatchArch toPatchOsabi
interpreterArch="$(getBinArch "$interpreter")"
@ -236,7 +236,7 @@ autoPatchelfFile() {
fi
local libcLib
libcLib="$(< "$NIX_CC/nix-support/orig-libc")/lib"
libcLib="$(< "$NIX_BINTOOLS/nix-support/orig-libc")/lib"
echo "searching for dependencies of $toPatch" >&2

View file

@ -143,7 +143,8 @@ with pkgs;
autorestic = callPackage ../tools/backup/autorestic { };
autoPatchelfHook = makeSetupHook { name = "auto-patchelf-hook"; }
autoPatchelfHook = makeSetupHook
{ name = "auto-patchelf-hook"; deps = [ bintools ]; }
../build-support/setup-hooks/auto-patchelf.sh;
appimageTools = callPackage ../build-support/appimage {