summary refs log tree commit diff
path: root/pkgs/development/tools/misc/autogen
diff options
context:
space:
mode:
authorRyan Burns <52847440+r-burns@users.noreply.github.com>2021-11-02 10:30:22 -0700
committerGitHub <noreply@github.com>2021-11-02 10:30:22 -0700
commit2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d (patch)
tree6d17963517283e0b46820b10926883937260b84b /pkgs/development/tools/misc/autogen
parentf0fdb5489c28f68cab196d95402a943aa286eee5 (diff)
parentefbeb4ee5bb4da39bd9c936d6ff1930dbe95d00b (diff)
downloadnixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.tar
nixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.tar.gz
nixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.tar.bz2
nixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.tar.lz
nixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.tar.xz
nixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.tar.zst
nixpkgs-2d78d6e01bdd8bf5b382722d4ee605cde2ad4d2d.zip
Merge pull request #126557 from r-burns/autogen
[staging] autogen: fix patchelf invocation to remove generic build path from rpath
Diffstat (limited to 'pkgs/development/tools/misc/autogen')
-rw-r--r--pkgs/development/tools/misc/autogen/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix
index da5bdf9742e..8f2121c2599 100644
--- a/pkgs/development/tools/misc/autogen/default.nix
+++ b/pkgs/development/tools/misc/autogen/default.nix
@@ -86,9 +86,9 @@ stdenv.mkDerivation rec {
     done
 
   '' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
-    # remove /build/** from RPATHs
+    # remove build directory (/build/**, or /tmp/nix-build-**) from RPATHs
     for f in "$bin"/bin/*; do
-      local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)/build/[^:]*:@\1@g')"
+      local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)'$NIX_BUILD_TOP'[^:]*:@\1@g')"
       patchelf --set-rpath "$nrp" "$f"
     done
   '';