nixpkgs-suyu/pkgs/build-support/setup-hooks
Lin Yinfeng bedc267a78
autoPatchelfHook: fix precise dependency ignorance
This commit fixes precise dependency ignorance by converting the
environment variable `autoPatchelfIgnoreMissingDeps` into a bash array
`ignoreMissingDepsArray`, passing `"${ignoreMissingDepsArray[@]}"`
instead of `"${autoPatchelfIgnoreMissingDeps[@]}"` to the python
script.

The original implementation does not work when
`autoPatchelfIgnoreMissingDeps` contains multiple dependency names.
Because it mistakenly passes `"${autoPatchelfIgnoreMissingDeps[@]}"`
to the python script. According to the Nix manual
(https://nixos.org/manual/nix/stable/expressions/derivations.html),
lists of strings are concatenated into whitespace-separated strings,
then passed to the builder as environment variables. So, if
`autoPatchelfIgnoreMissingDeps = [ "dep1" "dep2" "dep3" ]`,
`"${autoPatchelfIgnoreMissingDeps[@]}"` will be expanded to a single
argument `"dep1 dep2 dep3"`, which is not the intended behavior,
because the python script takes the long argument as a dependency
name.

With this commit, `"${ignoreMissingDepsArray[@]}"` will be expanded to
three arguments `"dep1" "dep2" "dep3"` arguments as expected, fixing
the issue.
2022-04-15 10:35:11 +08:00
..
wrap-gapps-hook
audit-blas.sh
audit-tmpdir.sh
auto-patchelf.py autoPatchelfHook: more precise dependency ignorance 2022-04-11 01:28:55 +00:00
auto-patchelf.sh autoPatchelfHook: fix precise dependency ignorance 2022-04-15 10:35:11 +08:00
autoreconf.sh
breakpoint-hook.sh
canonicalize-jars.sh
compress-man-pages.sh
copy-desktop-items.sh copyDesktopItems: Use variable for repeated path 2022-04-07 11:04:11 +00:00
desktop-to-darwin-bundle.sh desktopToDarwinBundle: Fall back to scaling available 2022-03-21 14:20:03 +01:00
die.sh
enable-coverage-instrumentation.sh
find-xml-catalogs.sh
fix-darwin-dylib-names.sh
gog-unpack.sh
install-shell-files.sh
keep-build-tree.sh
ld-is-cc-hook.sh
make-binary-wrapper.sh
make-coverage-analysis-report.sh
make-symlinks-relative.sh
make-wrapper.sh makeWrapper: Don't glob in prefix/suffix 2022-02-12 11:03:32 +01:00
move-docs.sh
move-lib64.sh
move-sbin.sh
move-systemd-user-units.sh
multiple-outputs.sh
patch-shebangs.sh
prune-libtool-files.sh
reproducible-builds.sh
role.bash
separate-debug-info.sh
set-java-classpath.sh
set-source-date-epoch-to-latest.sh
setup-debug-info-dirs.sh
shorten-perl-shebang.sh
strip.sh
update-autotools-gnu-config-scripts.sh
use-old-cxx-abi.sh
validate-pkg-config.sh
win-dll-link.sh