From 463377597b6b6182288e0bf6ec0a45c7507cb85f Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 5 Sep 2019 22:31:48 -0400 Subject: [PATCH] doc/gnome: explain glib passthru functions Examples are updated to commits that use them as well. --- doc/languages-frameworks/gnome.xml | 25 +++++++++++++++++++------ 1 file 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 { - Replacing a GI_TYPELIB_PATH in GNOME Shell extension – we are using substituteAll to include the path to a typelib into a patch. + Replacing a GI_TYPELIB_PATH in GNOME Shell extension – we are using substituteAll to include the path to a typelib into a patch. - + - Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library) – here, substituteAll cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a Nix bug. + The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions + + + + glib.getSchemaPath Takes a nix package attribute as an argument. + + + + + glib.makeSchemaPath Takes a package output like $out and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation. + + + - - - + + Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library) – here, substituteAll cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a Nix bug. + + Hard-coding GSettings schema path in C library – nothing special other than using Coccinelle patch to generate the patch itself.