Merge pull request #92886 from jtojnar/fix/gse-sysmon

This commit is contained in:
Jan Tojnar 2020-07-10 20:35:40 +02:00 committed by GitHub
commit a23cb68ccf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 15 deletions

View File

@ -1,6 +1,7 @@
{ fetchurl { fetchurl
, fetchpatch , fetchpatch
, substituteAll , substituteAll
, runCommand
, stdenv , stdenv
, pkgconfig , pkgconfig
, gnome3 , gnome3
@ -42,7 +43,7 @@
, wayland-protocols , wayland-protocols
}: }:
stdenv.mkDerivation rec { let self = stdenv.mkDerivation rec {
pname = "mutter"; pname = "mutter";
version = "3.36.4"; version = "3.36.4";
@ -132,6 +133,18 @@ stdenv.mkDerivation rec {
''; '';
passthru = { passthru = {
libdir = "${self}/lib/mutter-6";
tests = {
libdirExists = runCommand "mutter-libdir-exists" {} ''
if [[ ! -d ${self.libdir} ]]; then
echo "passthru.libdir should contain a directory, ${self.libdir} is not one."
exit 1
fi
touch $out
'';
};
updateScript = gnome3.updateScript { updateScript = gnome3.updateScript {
packageName = pname; packageName = pname;
attrPath = "gnome3.${pname}"; attrPath = "gnome3.${pname}";
@ -145,4 +158,5 @@ stdenv.mkDerivation rec {
maintainers = teams.gnome.members; maintainers = teams.gnome.members;
platforms = platforms.linux; platforms = platforms.linux;
}; };
} };
in self

View File

@ -1,14 +1,14 @@
{ stdenv, substituteAll, fetchFromGitHub, glib, glib-networking, libgtop, gnome3 }: { stdenv, substituteAll, fetchpatch, fetchFromGitHub, glib, glib-networking, libgtop, gnome3 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gnome-shell-system-monitor"; pname = "gnome-shell-system-monitor";
version = "38"; version = "2020-04-27-unstable";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "paradoxxxzero"; owner = "paradoxxxzero";
repo = "gnome-shell-system-monitor-applet"; repo = "gnome-shell-system-monitor-applet";
rev = "v${version}"; rev = "7f8f0a7b255473941f14d1dcaa35ebf39d3bccd0";
sha256 = "1sdj2kxb418mgq44a6lf6jic33wlfbnn3ja61igmx0jj1530iknv"; sha256 = "tUUvBY0UEUE+T79zVZEAICpKoriFZuuZzi9ArdHdXks=";
}; };
buildInputs = [ buildInputs = [
@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
(substituteAll { (substituteAll {
src = ./paths_and_nonexisting_dirs.patch; src = ./paths_and_nonexisting_dirs.patch;
clutter_path = gnome3.mutter.libdir; # this should not be used in settings but 🤷‍♀️
gtop_path = "${libgtop}/lib/girepository-1.0"; gtop_path = "${libgtop}/lib/girepository-1.0";
glib_net_path = "${glib-networking}/lib/girepository-1.0"; glib_net_path = "${glib-networking}/lib/girepository-1.0";
}) })
@ -41,8 +42,5 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ tiramiseb ]; maintainers = with maintainers; [ tiramiseb ];
homepage = "https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet"; homepage = "https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet";
# 3.36 support not yet ready
# https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/pull/564
broken = stdenv.lib.versionAtLeast gnome3.gnome-shell.version "3.34";
}; };
} }

View File

@ -1,5 +1,5 @@
diff --git a/system-monitor@paradoxxx.zero.gmail.com/extension.js b/system-monitor@paradoxxx.zero.gmail.com/extension.js diff --git a/system-monitor@paradoxxx.zero.gmail.com/extension.js b/system-monitor@paradoxxx.zero.gmail.com/extension.js
index b4b7f15..d139135 100644 index de5e3d7..2d7824d 100644
--- a/system-monitor@paradoxxx.zero.gmail.com/extension.js --- a/system-monitor@paradoxxx.zero.gmail.com/extension.js
+++ b/system-monitor@paradoxxx.zero.gmail.com/extension.js +++ b/system-monitor@paradoxxx.zero.gmail.com/extension.js
@@ -18,6 +18,9 @@ @@ -18,6 +18,9 @@
@ -11,13 +11,23 @@ index b4b7f15..d139135 100644
+ +
/* Ugly. This is here so that we don't crash old libnm-glib based shells unnecessarily /* Ugly. This is here so that we don't crash old libnm-glib based shells unnecessarily
* by loading the new libnm.so. Should go away eventually */ * by loading the new libnm.so. Should go away eventually */
const libnm_glib = imports.gi.GIRepository.Repository.get_default().is_registered("NMClient", "1.0");
@@ -386,7 +389,7 @@ const smMountsMonitor = new Lang.Class({ @@ -407,7 +410,7 @@ const smMountsMonitor = class SystemMonitor_smMountsMonitor {
connected: false, this.connected = false;
_init: function () {
this._volumeMonitor = Gio.VolumeMonitor.get(); this._volumeMonitor = Gio.VolumeMonitor.get();
- let sys_mounts = ['/home', '/tmp', '/boot', '/usr', '/usr/local']; - let sys_mounts = ['/home', '/tmp', '/boot', '/usr', '/usr/local'];
+ let sys_mounts = ['/home', '/tmp', '/boot']; + let sys_mounts = ['/home', '/tmp', '/boot'];
this.base_mounts = ['/']; this.base_mounts = ['/'];
sys_mounts.forEach(Lang.bind(this, function (sMount) { sys_mounts.forEach((sMount) => {
if (this.is_sys_mount(sMount + '/')) { if (this.is_sys_mount(sMount + '/')) {
diff --git a/system-monitor@paradoxxx.zero.gmail.com/prefs.js b/system-monitor@paradoxxx.zero.gmail.com/prefs.js
index 81d667c..0da4809 100644
--- a/system-monitor@paradoxxx.zero.gmail.com/prefs.js
+++ b/system-monitor@paradoxxx.zero.gmail.com/prefs.js
@@ -1,3 +1,5 @@
+imports.gi.GIRepository.Repository.prepend_search_path('@clutter_path@');
+
const Gtk = imports.gi.Gtk;
const Gio = imports.gi.Gio;
const Gdk = imports.gi.Gdk;