diff options
author | Connor Baker <connor.baker@tweag.io> | 2023-12-07 19:26:39 +0000 |
---|---|---|
committer | Connor Baker <connor.baker@tweag.io> | 2023-12-14 16:32:29 +0000 |
commit | 9faad7fb0b2a3a20aa0632573e78af02ff928f29 (patch) | |
tree | 204c8df4c9691279fad1fed6a3ee7d9036f48ddb /pkgs/build-support/setup-hooks | |
parent | 4ed08e5601a239bf7b4f3ae86c33fe89c27c80e0 (diff) |
auto-patchelf: add support for __structuredAttrs
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r-- | pkgs/build-support/setup-hooks/auto-patchelf.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index 371389df427bc..6930fcec9d1d4 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -53,7 +53,18 @@ autoPatchelf() { esac done - readarray -td' ' ignoreMissingDepsArray < <(echo -n "$autoPatchelfIgnoreMissingDeps") + if [ -n "$__structuredAttrs" ]; then + local ignoreMissingDepsArray=( "${autoPatchelfIgnoreMissingDeps[@]}" ) + local appendRunpathsArray=( "${appendRunpaths[@]}" ) + local runtimeDependenciesArray=( "${runtimeDependencies[@]}" ) + local patchelfFlagsArray=( "${patchelfFlags[@]}" ) + else + readarray -td' ' ignoreMissingDepsArray < <(echo -n "$autoPatchelfIgnoreMissingDeps") + local appendRunpathsArray=($appendRunpaths) + local runtimeDependenciesArray=($runtimeDependencies) + local patchelfFlagsArray=($patchelfFlags) + fi + if [ "$autoPatchelfIgnoreMissingDeps" == "1" ]; then echo "autoPatchelf: WARNING: setting 'autoPatchelfIgnoreMissingDeps" \ "= true;' is deprecated and will be removed in a future release." \ @@ -61,9 +72,6 @@ autoPatchelf() { ignoreMissingDepsArray=( "*" ) fi - local appendRunpathsArray=($appendRunpaths) - local runtimeDependenciesArray=($runtimeDependencies) - local patchelfFlagsArray=($patchelfFlags) @pythonInterpreter@ @autoPatchelfScript@ \ ${norecurse:+--no-recurse} \ --ignore-missing "${ignoreMissingDepsArray[@]}" \ |