mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
wrapGAppsHook: fix $gappsWrapperArgs as intended
i.e. define it even if $dontWrapGApps is set, and document the intention.
This commit is contained in:
parent
3f074b8a1e
commit
d10b9108f2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user