aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/languages-frameworks/gnome.xml10
-rw-r--r--pkgs/build-support/setup-hooks/wrap-gapps-hook.sh10
2 files changed, 18 insertions, 2 deletions
diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml
index 9e0f21a6c74..e9310d7c1ae 100644
--- a/doc/languages-frameworks/gnome.xml
+++ b/doc/languages-frameworks/gnome.xml
@@ -258,6 +258,16 @@ mkDerivation {
</para>
</listitem>
</varlistentry>
+ <varlistentry xml:id="ssec-gnome-common-issues-weird-location">
+ <term>
+ I need to wrap a binary outside <filename>bin</filename> and <filename>libexec</filename> directories.
+ </term>
+ <listitem>
+ <para>
+ You can manually trigger the wrapping with <function>wrapGApp</function> in <literal>preFixup</literal> phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to <function xlink:href="#fun-wrapProgram">wrapProgram</function> function.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</section>
</section>
diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
index 906b1db9d10..26a1107b85f 100644
--- a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
+++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
@@ -8,6 +8,12 @@ find_gio_modules() {
addEnvHooks "$targetOffset" find_gio_modules
+wrapGApp() {
+ local program="$1"
+ shift 1
+ wrapProgram "$program" "${gappsWrapperArgs[@]}" "$@"
+}
+
# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
wrapGAppsHook() {
# guard against running multiple times (e.g. due to propagation)
@@ -52,7 +58,7 @@ wrapGAppsHook() {
find "${targetDir}" -type f -executable -print0 \
| while IFS= read -r -d '' file; do
echo "Wrapping program '${file}'"
- wrapProgram "${file}" "${gappsWrapperArgs[@]}"
+ wrapGApp "${file}"
done
fi
done
@@ -71,7 +77,7 @@ wrapGAppsHook() {
fi
done
echo "Wrapping link: '$linkPath'"
- wrapProgram "${linkPath}" "${gappsWrapperArgs[@]}"
+ wrapGApp "${linkPath}"
done
fi
fi