mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
gnomeExtensions.system-monitor: patch to add GTop to the extension's path
(cherry picked from commit 064730b54f
)
This commit is contained in:
parent
0ff3d75bf8
commit
838860ac83
|
@ -113,6 +113,15 @@ super: lib.trivial.pipe super [
|
|||
];
|
||||
}))
|
||||
|
||||
(patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: {
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch;
|
||||
gtop_path = "${libgtop}/lib/girepository-1.0";
|
||||
})
|
||||
];
|
||||
}))
|
||||
|
||||
(patchExtension "system-monitor-next@paradoxxx.zero.gmail.com" (old: {
|
||||
patches = [
|
||||
(substituteAll {
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
diff --git a/extension.js b/extension.js
|
||||
index 37d2eb1..232d0d5 100644
|
||||
--- a/extension.js
|
||||
+++ b/extension.js
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
import Clutter from 'gi://Clutter';
|
||||
import Gio from 'gi://Gio';
|
||||
+import GIRepository from "gi://GIRepository";
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
-import GTop from 'gi://GTop';
|
||||
import Pango from 'gi://Pango';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
@@ -19,6 +19,9 @@ import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
|
||||
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
|
||||
+GIRepository.Repository.prepend_search_path('@gtop_path@');
|
||||
+const GTop = (await import("gi://GTop")).default;
|
||||
+
|
||||
const THRESHOLD_HIGH = 0.80;
|
||||
|
||||
// adapted from load-graph.cpp in gnome-system-monitor
|
Loading…
Reference in a new issue