git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #153246 from jtojnar/glib-schemadatadir

glib: Add helpers for finding schema datadir

commite4eed15d8b0af4dfcb8d420c93e039328a968ddd authorJan Tojnar <jtojnar@gmail.com> dateSun 9 Jan 2022, 16:09 (5 years ago) parent67879a97e95149
4 files changed+8−4
pkgs/desktops/gnome/apps/seahorse/default.nix+1−1 pkgs/development/libraries/glib/default.nix+5−1 pkgs/development/libraries/libadwaita/default.nix+1−1 pkgs/development/libraries/libhandy/default.nix+1−1
pkgs/desktops/gnome/apps/seahorse/default.nix+1−1
@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
7373 # Add “org.gnome.crypto.pgp” GSettings schema to path
7474 # to make it available for “gpgme-backend” test.
7575 # It is used by Seahorse’s internal “common” library.
76− addToSearchPath XDG_DATA_DIRS "${glib.getSchemaPath gcr}/../.."
76+ addToSearchPath XDG_DATA_DIRS "${glib.getSchemaDataDirPath gcr}"
7777 # The same test also requires home directory so that it can store settings.
7878 export HOME=$TMPDIR
7979 '';
pkgs/development/libraries/glib/default.nix+5−1
@@ -191,8 +191,12 @@ stdenv.mkDerivation rec {
191191
192192 passthru = rec {
193193 gioModuleDir = "lib/gio/modules";
194− makeSchemaPath = dir: name: "${dir}/share/gsettings-schemas/${name}/glib-2.0/schemas";
194+
195+ makeSchemaDataDirPath = dir: name: "${dir}/share/gsettings-schemas/${name}";
196+ makeSchemaPath = dir: name: "${makeSchemaDataDirPath dir name}/glib-2.0/schemas";
195197 getSchemaPath = pkg: makeSchemaPath pkg pkg.name;
198+ getSchemaDataDirPath = pkg: makeSchemaDataDirPath pkg pkg.name;
199+
196200 inherit flattenInclude;
197201 updateScript = gnome.updateScript { packageName = "glib"; };
198202 };
pkgs/development/libraries/libadwaita/default.nix+1−1
@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
7373 # AdwSettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
7474 # It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
7575 # See adw_settings_constructed function in https://gitlab.gnome.org/GNOME/libadwaita/commit/60ec69f0a5d49cad8a6d79e4ecefd06dc6e3db12
76− "XDG_DATA_DIRS=${glib.getSchemaPath gsettings-desktop-schemas}/../.."
76+ "XDG_DATA_DIRS=${glib.getSchemaDataDirPath gsettings-desktop-schemas}"
7777
7878 # Tests need a cache directory
7979 "HOME=$TMPDIR"
pkgs/development/libraries/libhandy/default.nix+1−1
@@ -94,7 +94,7 @@ stdenv.mkDerivation rec {
9494 # HdySettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
9595 # It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
9696 # See hdy_settings_constructed function in https://gitlab.gnome.org/GNOME/libhandy/-/commit/bb68249b005c445947bfb2bee66c91d0fe9c41a4
97− "${glib.getSchemaPath gsettings-desktop-schemas}/../.."
97+ (glib.getSchemaDataDirPath gsettings-desktop-schemas)
9898
9999 # Some tests require icons
100100 "${hicolor-icon-theme}/share"