From fb01653b137ef9d28760f7b2087329beb81f4068 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Mon, 22 Jan 2024 23:08:55 +0100 Subject: [PATCH] nautilus-open-any-terminal: 0.4.0 -> 0.5.0 --- .../nautilus-open-any-terminal/default.nix | 8 ++++--- .../hardcode-gsettings.patch | 22 +++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/misc/nautilus-open-any-terminal/default.nix b/pkgs/tools/misc/nautilus-open-any-terminal/default.nix index 4a115499d7a2..54e85c063633 100644 --- a/pkgs/tools/misc/nautilus-open-any-terminal/default.nix +++ b/pkgs/tools/misc/nautilus-open-any-terminal/default.nix @@ -14,13 +14,14 @@ python3.pkgs.buildPythonPackage rec { pname = "nautilus-open-any-terminal"; - version = "0.4.0"; + version = "0.5.0"; + pyproject = true; src = fetchFromGitHub { owner = "Stunkymonkey"; repo = pname; rev = version; - sha256 = "sha256-EAI60Mw+OTPfjOS6lkGMul7QvTR7NXyNfevWY2JP1yI="; + hash = "sha256-fcTbt8O/7KEme5+GlDD7hMMcE2RaYqFdfojzJ1KhnA0="; }; patches = [ ./hardcode-gsettings.patch ]; @@ -30,6 +31,7 @@ python3.pkgs.buildPythonPackage rec { gobject-introspection pkg-config wrapGAppsHook + python3.pkgs.setuptools ]; buildInputs = [ @@ -43,7 +45,7 @@ python3.pkgs.buildPythonPackage rec { ]; postPatch = '' - substituteInPlace nautilus_open_any_terminal/open_any_terminal_extension.py \ + substituteInPlace nautilus_open_any_terminal/nautilus_open_any_terminal.py \ --subst-var-by gsettings_path ${glib.makeSchemaPath "$out" "$name"} ''; diff --git a/pkgs/tools/misc/nautilus-open-any-terminal/hardcode-gsettings.patch b/pkgs/tools/misc/nautilus-open-any-terminal/hardcode-gsettings.patch index 194bb55902ae..5116d5110ca1 100644 --- a/pkgs/tools/misc/nautilus-open-any-terminal/hardcode-gsettings.patch +++ b/pkgs/tools/misc/nautilus-open-any-terminal/hardcode-gsettings.patch @@ -1,22 +1,22 @@ -diff --git a/nautilus_open_any_terminal/open_any_terminal_extension.py b/nautilus_open_any_terminal/open_any_terminal_extension.py +diff --git a/nautilus_open_any_terminal/nautilus_open_any_terminal.py b/nautilus_open_any_terminal/nautilus_open_any_terminal.py index b02a995..a616399 100644 ---- a/nautilus_open_any_terminal/open_any_terminal_extension.py -+++ b/nautilus_open_any_terminal/open_any_terminal_extension.py -@@ -205,9 +205,10 @@ def set_terminal_args(*args): - - class OpenAnyTerminalShortcutProvider(GObject.GObject, Nautilus.LocationWidgetProvider): +--- a/nautilus_open_any_terminal/nautilus_open_any_terminal.py ++++ b/nautilus_open_any_terminal/nautilus_open_any_terminal.py +@@ -228,9 +228,10 @@ def set_terminal_args(*args): + """Provide keyboard shortcuts for opening terminals in Nautilus.""" + def __init__(self): -- source = Gio.SettingsSchemaSource.get_default() -- if source.lookup(GSETTINGS_PATH, True): +- gsettings_source = Gio.SettingsSchemaSource.get_default() +- if gsettings_source.lookup(GSETTINGS_PATH, True): - self._gsettings = Gio.Settings.new(GSETTINGS_PATH) -+ source = Gio.SettingsSchemaSource.new_from_directory("@gsettings_path@", Gio.SettingsSchemaSource.get_default(), True) ++ gsettings_source = Gio.SettingsSchemaSource.new_from_directory("@gsettings_path@", Gio.SettingsSchemaSource.get_default(), True) + if True: -+ _schema = source.lookup(GSETTINGS_PATH, False) ++ _schema = gsettings_source.lookup(GSETTINGS_PATH, False) + self._gsettings = Gio.Settings.new_full(_schema, None, None); self._gsettings.connect("changed", self._bind_shortcut) self._create_accel_group() self._window = None -@@ -232,9 +233,10 @@ class OpenAnyTerminalExtension(GObject.GObject, Nautilus.MenuProvider): +@@ -326,9 +327,10 @@ class OpenAnyTerminalExtension(GObject.GObject, Nautilus.MenuProvider): return items