From 889760fb2a09045c851b751a133c74fb254527f2 Mon Sep 17 00:00:00 2001 From: Stefan Kranich Date: Fri, 24 Nov 2023 15:22:42 +0100 Subject: [PATCH] gnomeExtensions.gsconnect: 55 -> 56 --- .../gnome/extensions/gsconnect/default.nix | 4 +- .../extensions/gsconnect/fix-paths.patch | 40 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/pkgs/desktops/gnome/extensions/gsconnect/default.nix b/pkgs/desktops/gnome/extensions/gsconnect/default.nix index d4d8f0c3e0b8..b7577888df23 100644 --- a/pkgs/desktops/gnome/extensions/gsconnect/default.nix +++ b/pkgs/desktops/gnome/extensions/gsconnect/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { pname = "gnome-shell-extension-gsconnect"; - version = "55"; + version = "56"; outputs = [ "out" "installedTests" ]; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { owner = "GSConnect"; repo = "gnome-shell-extension-gsconnect"; rev = "v${version}"; - hash = "sha256-n6NbNgl+2FOhly/BeR7I6BvPOYe7leAdeAegaqhcGJU="; + hash = "sha256-V2L65Fz1WcJE2ENE8uNgIuVSXLDHokcgM4Caz1sOdZM="; }; patches = [ diff --git a/pkgs/desktops/gnome/extensions/gsconnect/fix-paths.patch b/pkgs/desktops/gnome/extensions/gsconnect/fix-paths.patch index 894f5e0197be..7fe5e33fa6ad 100644 --- a/pkgs/desktops/gnome/extensions/gsconnect/fix-paths.patch +++ b/pkgs/desktops/gnome/extensions/gsconnect/fix-paths.patch @@ -11,29 +11,37 @@ index 3fb887c3..e8cbe1bd 100644 Terminal=false NoDisplay=true Icon=org.gnome.Shell.Extensions.GSConnect +diff --git a/src/__nix-prepend-search-paths.js b/src/__nix-prepend-search-paths.js +new file mode 100644 +index 00000000..d009dfd9 +--- /dev/null ++++ b/src/__nix-prepend-search-paths.js +@@ -0,0 +1,2 @@ ++import GIRepository from 'gi://GIRepository'; ++'@typelibPath@'.split(':').forEach(path => GIRepository.Repository.prepend_search_path(path)); diff --git a/src/extension.js b/src/extension.js -index 3fae443a..7aa19842 100644 +index 53ecd5fc..78782357 100644 --- a/src/extension.js +++ b/src/extension.js -@@ -4,6 +4,8 @@ +@@ -2,6 +2,8 @@ + // + // SPDX-License-Identifier: GPL-2.0-or-later - 'use strict'; - -+'@typelibPath@'.split(':').forEach(path => imports.gi.GIRepository.Repository.prepend_search_path(path)); ++import './__nix-prepend-search-paths.js'; + - const Gio = imports.gi.Gio; - const GObject = imports.gi.GObject; - const Gtk = imports.gi.Gtk; + import Gio from 'gi://Gio'; + import GObject from 'gi://GObject'; + diff --git a/src/prefs.js b/src/prefs.js -index b8860c82..d6292606 100644 +index dd20fd20..5f82c53a 100644 --- a/src/prefs.js +++ b/src/prefs.js -@@ -4,6 +4,8 @@ +@@ -2,6 +2,8 @@ + // + // SPDX-License-Identifier: GPL-2.0-or-later - 'use strict'; - -+'@typelibPath@'.split(':').forEach(path => imports.gi.GIRepository.Repository.prepend_search_path(path)); ++import './__nix-prepend-search-paths.js'; + - const {Gio, GLib, Adw} = imports.gi; - - // Bootstrap + import Gio from 'gi://Gio'; + import GLib from 'gi://GLib'; + import Adw from 'gi://Adw';