nixpkgs/pkgs/desktops/gnome-3/misc/gnome-tweak-tool/find_gsettings.patch
Jan Tojnar 69698ec11c gnome3: only maintain single GNOME 3 package set (#29397)
* gnome3: only maintain single GNOME 3 package set

GNOME 3 was split into 3.10 and 3.12 in #2694. Unfortunately, we barely have the resources
to update a single version of GNOME. Maintaining multiple versions just does not make sense.
Additionally, it makes viewing history using most Git tools bothersome.

This commit renames `pkgs/desktops/gnome-3/3.24` to `pkgs/desktops/gnome-3`, removes
the config variable for choosing packageset (`environment.gnome3.packageSet`), updates
the hint in maintainer script, and removes the `gnome3_24` derivation from `all-packages.nix`.

Closes: #29329

* maintainers/scripts/gnome: Use fixed GNOME 3 directory

Since we now allow only a single GNOME 3 package set, specifying
the working directory is not necessary.

This commit sets the directory to `pkgs/desktops/gnome-3`.
2017-09-24 12:15:50 +01:00

23 lines
943 B
Diff

diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index a00fe19..dce74b2 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -33,10 +33,15 @@ class GSettingsMissingError(Exception):
class _GSettingsSchema:
def __init__(self, schema_name, schema_dir=None, schema_filename=None, **options):
- if not schema_dir:
- schema_dir = gtweak.GSETTINGS_SCHEMA_DIR
if not schema_filename:
schema_filename = schema_name + ".gschema.xml"
+ if not schema_dir:
+ schema_dir = gtweak.GSETTINGS_SCHEMA_DIR
+ for xdg_dir in GLib.get_system_data_dirs():
+ dir = os.path.join(xdg_dir, "glib-2.0", "schemas")
+ if os.path.exists(os.path.join(dir, schema_filename)):
+ schema_dir = dir
+ break
schema_path = os.path.join(schema_dir, schema_filename)
if not os.path.exists(schema_path):