gnomeExtensions.pano: 22 -> v23-alpha3 (#352899)

This commit is contained in:
Aleksana 2024-12-05 20:46:19 +08:00 committed by GitHub
commit 20e276f1a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 34 deletions

View File

@ -1,4 +1,5 @@
{ lib
, fetchzip
, ddcutil
, easyeffects
, gjs
@ -112,13 +113,18 @@ super: lib.trivial.pipe super [
];
}))
(patchExtension "pano@elhan.io" (old: {
patches = [
(substituteAll {
src = ./extensionOverridesPatches/pano_at_elhan.io.patch;
inherit gsound libgda;
})
];
(patchExtension "pano@elhan.io" (final: prev: {
version = "v23-alpha3";
src = fetchzip {
url = "https://github.com/oae/gnome-shell-pano/releases/download/${final.version}/pano@elhan.io.zip";
hash = "sha256-LYpxsl/PC8hwz0ZdH5cDdSZPRmkniBPUCqHQxB4KNhc=";
stripRoot = false;
};
preInstall = ''
substituteInPlace extension.js \
--replace-fail "import Gda from 'gi://Gda?version>=5.0'" "imports.gi.GIRepository.Repository.prepend_search_path('${libgda}/lib/girepository-1.0'); const Gda = (await import('gi://Gda')).default" \
--replace-fail "import GSound from 'gi://GSound'" "imports.gi.GIRepository.Repository.prepend_search_path('${gsound}/lib/girepository-1.0'); const GSound = (await import('gi://GSound')).default"
'';
}))
(patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: {

View File

@ -1,27 +0,0 @@
diff --git a/__nix-prepend-search-paths.js b/__nix-prepend-search-paths.js
new file mode 100644
index 0000000..bf3071b
--- /dev/null
+++ b/__nix-prepend-search-paths.js
@@ -0,0 +1,3 @@
+import GIRepository from 'gi://GIRepository';
+GIRepository.Repository.prepend_search_path('@gsound@/lib/girepository-1.0');
+GIRepository.Repository.prepend_search_path('@libgda@/lib/girepository-1.0');
diff --git a/extension.js b/extension.js
index a3d6741..6a38850 100644
--- a/extension.js
+++ b/extension.js
@@ -1,3 +1,4 @@
+import './__nix-prepend-search-paths.js';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import Shell from 'gi://Shell';
diff --git a/prefs.js b/prefs.js
index 5dd94eb..634b2ef 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1,3 +1,4 @@
+import './__nix-prepend-search-paths.js';
import Gdk from 'gi://Gdk';
import Gtk from 'gi://Gtk';
import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';