wrapGAppsHook: build hook for wrapping GTK/GNOME apps
This commit is contained in:
parent
cce3aa1e22
commit
763fda70f0
33
pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
Normal file
33
pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
gappsWrapperArgs=()
|
||||||
|
|
||||||
|
wrapGAppsHook() {
|
||||||
|
if [ -n "$GDK_PIXBUF_MODULE_FILE" ]; then
|
||||||
|
gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$XDG_ICON_DIRS" ]; then
|
||||||
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$GSETTINGS_SCHEMAS_PATH" ]; then
|
||||||
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$prefix/share" ]; then
|
||||||
|
gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$out/share")
|
||||||
|
fi
|
||||||
|
|
||||||
|
for v in $wrapPrefixVariables GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do
|
||||||
|
eval local dummy="\$$v"
|
||||||
|
gappsWrapperArgs+=(--prefix $v : "$dummy")
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$dontWrapGApps" ]; then
|
||||||
|
for i in $prefix/bin/* $prefix/libexec/*; do
|
||||||
|
echo "Wrapping app $i"
|
||||||
|
wrapProgram "$i" "${gappsWrapperArgs[@]}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
fixupOutputHooks+=(wrapGAppsHook)
|
@ -512,6 +512,10 @@ let
|
|||||||
|
|
||||||
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
|
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
|
||||||
|
|
||||||
|
wrapGAppsHook = makeSetupHook {
|
||||||
|
deps = [ makeWrapper ];
|
||||||
|
} ../build-support/setup-hooks/wrap-gapps-hook.sh;
|
||||||
|
|
||||||
|
|
||||||
### TOOLS
|
### TOOLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user