From 69e0d954624103d24de0b3f3ebb279ed0a799dd5 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 5 Sep 2019 21:30:06 -0400 Subject: [PATCH] doc/gnome: explain double wrapped binaries --- doc/languages-frameworks/gnome.xml | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml index 2bead65ecf1..399e7c396a8 100644 --- a/doc/languages-frameworks/gnome.xml +++ b/doc/languages-frameworks/gnome.xml @@ -166,6 +166,58 @@ preFixup = '' + + + When using wrapGAppsHook with special derivers you can end up with double wrapped binaries. + + + + This is because derivers like python.pkgs.buildPythonApplication or qt5.mkDerivation have setup-hooks automatically added that produce wrappers with makeWrapper. The simplest way to workaround that is to disable the wrapGAppsHook automatic wrapping with dontWrapGApps = true; and pass the arguments it intended to pass to makeWrapper to another. + + + In the case of a Python application it could look like: + +python3.pkgs.buildPythonApplication { + pname = "gnome-music"; + version = "3.32.2"; + + nativeBuildInputs = [ + wrapGAppsHook + gobject-introspection + ... + ]; + + dontWrapGApps = true; + + # Arguments to be passed to `makeWrapper`, only used by buildPython* + makeWrapperArgs = [ + "\${gappsWrapperArgs[@]}" + ]; +} + + And for a QT app like: + +mkDerivation { + pname = "calibre"; + version = "3.47.0"; + + nativeBuildInputs = [ + wrapGAppsHook + qmake + ... + ]; + + dontWrapGApps = true; + + # Arguments to be passed to `makeWrapper`, only used by qt5’s mkDerivation + qtWrapperArgs [ + "\${gappsWrapperArgs[@]}" + ]; +} + + + + I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.