diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-09-05 22:31:48 -0400 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-09-06 06:29:35 +0200 |
commit | 463377597b6b6182288e0bf6ec0a45c7507cb85f (patch) | |
tree | dd6f8c63d6a244523e63baff87730696b1cbedc5 /doc | |
parent | 69e0d954624103d24de0b3f3ebb279ed0a799dd5 (diff) | |
download | nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.tar nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.tar.gz nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.tar.bz2 nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.tar.lz nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.tar.xz nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.tar.zst nixpkgs-463377597b6b6182288e0bf6ec0a45c7507cb85f.zip |
doc/gnome: explain glib passthru functions
Examples are updated to commits that use them as well.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/languages-frameworks/gnome.xml | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/doc/languages-frameworks/gnome.xml b/doc/languages-frameworks/gnome.xml index 399e7c396a8..9e0f21a6c74 100644 --- a/doc/languages-frameworks/gnome.xml +++ b/doc/languages-frameworks/gnome.xml @@ -228,16 +228,29 @@ mkDerivation { <itemizedlist> <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext"> <para> - <link xlink:href="https://github.com/NixOS/nixpkgs/blob/65000c0ff8f31b982c59fd65ab5421251239df4c/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> – we are using <function>substituteAll</function> to include the path to a typelib into a patch. + <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> – we are using <function>substituteAll</function> to include the path to a typelib into a patch. </para> </listitem> - <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala"> + <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings"> <para> - <link xlink:href="https://github.com/NixOS/nixpkgs/blob/65000c0ff8f31b982c59fd65ab5421251239df4c/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> – here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>. + The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions + <itemizedlist> + <listitem> + <para> + <function>glib.getSchemaPath</function> Takes a nix package attribute as an argument. + </para> + </listitem> + <listitem> + <para> + <function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation. + </para> + </listitem> + </itemizedlist> </para> - </listitem> - <listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c"> - <para> + <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala"> + <link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> – here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>. + </para> + <para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c"> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> – nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself. </para> </listitem> |