diff options
author | aszlig <aszlig@nix.build> | 2018-11-19 17:18:27 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-11-19 17:18:27 +0100 |
commit | d03e4ffdbf9849f7e928c7a95be76aac69780c55 (patch) | |
tree | e9bed1b584e77e74d3a96af7f40aa640ee071040 /pkgs/build-support/setup-hooks | |
parent | 3ae0407d3c9dbb7cdf049b69ebb32e62c39357e7 (diff) | |
download | nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.tar nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.tar.gz nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.tar.bz2 nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.tar.lz nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.tar.xz nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.tar.zst nixpkgs-d03e4ffdbf9849f7e928c7a95be76aac69780c55.zip |
autoPatchelfHook: Make easier to run autoPatchelf
The autoPatchelf main function which is run against all of the outputs was pretty much tailored towards this specific setup-hook and was relying on $prefix to be set globally. So if you wanted to run autoPatchelf manually - let's say during buildPhase - you would have needed to run it like this: prefix=/some/directory autoPatchelf This is now more intuitive and all you need to do is run the following: autoPatchelf /some/directory Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r-- | pkgs/build-support/setup-hooks/auto-patchelf.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index d1ae317ff9a..59e9a933211 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -153,7 +153,7 @@ autoPatchelf() { # Add all shared objects of the current output path to the start of # cachedDependencies so that it's choosen first in findDependency. cachedDependencies+=( - $(find "$prefix" \! -type d \( -name '*.so' -o -name '*.so.*' \)) + $(find "$@" \! -type d \( -name '*.so' -o -name '*.so.*' \)) ) local elffile @@ -169,7 +169,7 @@ autoPatchelf() { LANG=C readelf -l "$file" | grep -q "^ *INTERP\\>" || continue fi autoPatchelfFile "$file" - done < <(find "$prefix" -type f -print0) + done < <(find "$@" -type f -print0) } # XXX: This should ultimately use fixupOutputHooks but we currently don't have @@ -181,5 +181,5 @@ autoPatchelf() { # behaviour as fixupOutputHooks because the setup hook for patchelf is run in # fixupOutput and the postFixup hook runs later. postFixupHooks+=( - 'for output in $outputs; do prefix="${!output}" autoPatchelf; done' + 'autoPatchelf $(for output in $outputs; do echo "${!output}"; done)' ) |