diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2024-01-19 23:45:18 +0000 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2024-05-04 14:46:46 +0200 |
commit | 9756fb08f732ae95fd305f1eaaaf118948f0894d (patch) | |
tree | 881133c50c1fedcb8140bb78d9e97f025861d9b1 | |
parent | dfc16bf0b69572acd34369f66176fbf64adf44e9 (diff) |
guake: 3.9.0 → 3.10
https://github.com/Guake/guake/releases/tag/3.10
https://github.com/Guake/guake/compare/3.9.0...3.10
-rw-r--r-- | pkgs/applications/terminal-emulators/guake/default.nix | 40 | ||||
-rw-r--r-- | pkgs/applications/terminal-emulators/guake/no-compile-schemas.patch | 34 |
2 files changed, 69 insertions, 5 deletions
diff --git a/pkgs/applications/terminal-emulators/guake/default.nix b/pkgs/applications/terminal-emulators/guake/default.nix index 9342e1833ac2..239d9a2fe048 100644 --- a/pkgs/applications/terminal-emulators/guake/default.nix +++ b/pkgs/applications/terminal-emulators/guake/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchpatch , python3 , glibcLocales , gobject-introspection @@ -10,22 +11,47 @@ , libutempter , vte , libwnck +, dconf , nixosTests }: python3.pkgs.buildPythonApplication rec { pname = "guake"; - version = "3.9.0"; + version = "3.10"; - format = "other"; + pyproject = false; src = fetchFromGitHub { owner = "Guake"; repo = "guake"; rev = "refs/tags/${version}"; - sha256 = "sha256-BW13fBH26UqMPMjV8JC4QkpgzyoPfCpAfSkJD68uOZU="; + hash = "sha256-e6Bf4HDftHBxFPcw9z02CqgZhSIvt6wlLF6dnIh9fEc="; }; + patches = [ + # Avoid trying to recompile schema at runtime, + # the package should be responsible for ensuring it is up to date. + # Without this, the package will try to run glib-compile-schemas + # on every update, which is pointless and will crash + # unless user has it installed. + ./no-compile-schemas.patch + + # Avoid using pip since it fails on not being able to find setuptools. + # Note: This is not a long-term solution, setup.py is deprecated. + (fetchpatch { + url = "https://github.com/Guake/guake/commit/14abaa0c69cfab64fe3467fbbea211d830042de8.patch"; + hash = "sha256-RjGRFJDTQX2meAaw3UZi/3OxAtIHbRZVpXTbcJk/scY= "; + revert = true; + }) + + # Revert switch to FHS. + (fetchpatch { + url = "https://github.com/Guake/guake/commit/8c7a23ba62ee262c033dfa5b0b18d3df71361ff4.patch"; + hash = "sha256-0asXI08XITkFc73EUenV9qxY/Eak+TzygRRK7GvhQUc="; + revert = true; + }) + ]; + nativeBuildInputs = [ gobject-introspection wrapGAppsHook3 @@ -57,7 +83,11 @@ python3.pkgs.buildPythonApplication rec { ]; preFixup = '' - gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libutempter ]}") + gappsWrapperArgs+=( + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libutempter ]}" + # For settings migration. + --prefix PATH : "${lib.makeBinPath [ dconf ]}" + ) ''; passthru.tests.test = nixosTests.terminal-emulators.guake; @@ -65,7 +95,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "Drop-down terminal for GNOME"; homepage = "http://guake-project.org"; - license = licenses.gpl2; + license = licenses.gpl2Plus; maintainers = [ maintainers.msteen ]; platforms = platforms.linux; }; diff --git a/pkgs/applications/terminal-emulators/guake/no-compile-schemas.patch b/pkgs/applications/terminal-emulators/guake/no-compile-schemas.patch new file mode 100644 index 000000000000..e73387e1fc09 --- /dev/null +++ b/pkgs/applications/terminal-emulators/guake/no-compile-schemas.patch @@ -0,0 +1,34 @@ +diff --git a/guake/guake_app.py b/guake/guake_app.py +index 48074db..d7d1371 100644 +--- a/guake/guake_app.py ++++ b/guake/guake_app.py +@@ -109,12 +109,7 @@ class Guake(SimpleGladeApp): + SCHEMA_DIR, Gio.SettingsSchemaSource.get_default(), False + ) + +- try: +- schema_source = load_schema() +- except GLib.Error: # pylint: disable=catching-non-exception +- log.exception("Unable to load the GLib schema, try to compile it") +- try_to_compile_glib_schemas() +- schema_source = load_schema() ++ schema_source = load_schema() + self.settings = Settings(schema_source) + self.accel_group = None + +@@ -122,13 +117,8 @@ class Guake(SimpleGladeApp): + "schema-version" not in self.settings.general.keys() + or self.settings.general.get_string("schema-version") != guake_version() + ): +- log.exception("Schema from old guake version detected, regenerating schema") +- try: +- try_to_compile_glib_schemas() +- except subprocess.CalledProcessError: +- log.exception("Schema in non user-editable location, attempting to continue") +- schema_source = load_schema() +- self.settings = Settings(schema_source) ++ log.exception("Schema from old guake version detected") ++ # Kept for compatibility with other distros. + self.settings.general.set_string("schema-version", guake_version()) + + log.info("Language previously loaded from: %s", LOCALE_DIR) |