diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-11-09 15:38:26 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-11-09 15:40:20 +0100 |
commit | d10b9108f2b6b3c7e02234e6abe85ce29600cc0b (patch) | |
tree | fceb49b91ed796540c76f9aaaf7a2b3e534d9093 /pkgs/build-support | |
parent | 3f074b8a1e4d7c57b48cc3adf0f00c3f403eaefa (diff) | |
download | nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.tar nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.tar.gz nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.tar.bz2 nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.tar.lz nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.tar.xz nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.tar.zst nixlib-d10b9108f2b6b3c7e02234e6abe85ce29600cc0b.zip |
wrapGAppsHook: fix $gappsWrapperArgs as intended
i.e. define it even if $dontWrapGApps is set, and document the intention.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/setup-hooks/wrap-gapps-hook.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh index 82cc7ec330d6..9e0cd22c1198 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh @@ -8,9 +8,11 @@ find_gio_modules() { envHooks+=(find_gio_modules) +# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set. wrapGAppsHook() { - [ -z "$dontWrapGApps" ] || return - dontWrapGApps=1 # guard against running multiple times (e.g. due to propagation) + # guard against running multiple times (e.g. due to propagation) + [ -z "$wrapGAppsHookHasRun" ] || return + wrapGAppsHookHasRun=1 if [ -n "$GDK_PIXBUF_MODULE_FILE" ]; then gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE") @@ -33,10 +35,12 @@ wrapGAppsHook() { gappsWrapperArgs+=(--prefix $v : "$dummy") done - for i in $prefix/bin/* $prefix/libexec/*; do - echo "Wrapping app $i" - wrapProgram "$i" "${gappsWrapperArgs[@]}" - done + if [ -z "$dontWrapGApps" ]; then + for i in $prefix/bin/* $prefix/libexec/*; do + echo "Wrapping app $i" + wrapProgram "$i" "${gappsWrapperArgs[@]}" + done + fi } fixupOutputHooks+=(wrapGAppsHook) |