mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
Merge [Backport release-25.05] gnomeExtensions.applications-menu: fix GMenu import (#408196)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
easyeffects,
|
||||
gjs,
|
||||
glib,
|
||||
gnome-menus,
|
||||
nautilus,
|
||||
gobject-introspection,
|
||||
hddtemp,
|
||||
@@ -47,6 +48,17 @@ in
|
||||
# the upstream repository's sources.
|
||||
super:
|
||||
lib.trivial.pipe super [
|
||||
(patchExtension "apps-menu@gnome-shell-extensions.gcampax.github.com" (old: {
|
||||
patches = [
|
||||
(replaceVars
|
||||
./extensionOverridesPatches/apps-menu_at_gnome-shell-extensions.gcampax.github.com.patch
|
||||
{
|
||||
gmenu_path = "${gnome-menus}/lib/girepository-1.0";
|
||||
}
|
||||
)
|
||||
];
|
||||
}))
|
||||
|
||||
(patchExtension "caffeine@patapon.info" (old: {
|
||||
meta.maintainers = with lib.maintainers; [ eperuffo ];
|
||||
}))
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/extension.js b/extension.js
|
||||
index c608441..2b25335 100644
|
||||
--- a/extension.js
|
||||
+++ b/extension.js
|
||||
@@ -9,7 +9,11 @@ import Atk from 'gi://Atk';
|
||||
import Clutter from 'gi://Clutter';
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
-import GMenu from 'gi://GMenu';
|
||||
+
|
||||
+import GIRepository from 'gi://GIRepository';
|
||||
+GIRepository.Repository.prepend_search_path('@gmenu_path@');
|
||||
+const {default: GMenu} = await import('gi://GMenu');
|
||||
+
|
||||
import GObject from 'gi://GObject';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import Meta from 'gi://Meta';
|
||||
Reference in New Issue
Block a user