mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
doc/gnome: explain double wrapped binaries
This commit is contained in:
parent
075b528a6d
commit
69e0d95462
@ -166,6 +166,58 @@ preFixup = ''
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ssec-gnome-common-issues-double-wrapped">
|
||||
<term>
|
||||
When using <package>wrapGAppsHook</package> with special derivers you can end up with double wrapped binaries.
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with <code>dontWrapGApps = true;</code> and pass the arguments it intended to pass to <package>makeWrapper</package> to another.
|
||||
</para>
|
||||
<para>
|
||||
In the case of a Python application it could look like:
|
||||
<programlisting>
|
||||
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[@]}"
|
||||
];
|
||||
}
|
||||
</programlisting>
|
||||
And for a QT app like:
|
||||
<programlisting>
|
||||
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[@]}"
|
||||
];
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ssec-gnome-common-issues-unwrappable-package">
|
||||
<term>
|
||||
I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.
|
||||
|
Loading…
Reference in New Issue
Block a user