diff --git a/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix b/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix index 01b3fbad7c2f..eed34ae523d4 100644 --- a/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix +++ b/pkgs/desktops/gnome-3/extensions/system-monitor/default.nix @@ -1,6 +1,4 @@ -# This package needs the following configuration in configuration.nix: -# services.xserver.desktopManager.gnome3.sessionPath = [ pkgs.libgtop pkgs.glib_networking ]; -{ config, stdenv, fetchFromGitHub, glib, glib_networking, libgtop, pkgs }: +{ config, stdenv, substituteAll, fetchFromGitHub, glib, glib_networking, libgtop, pkgs }: stdenv.mkDerivation rec { name = "gnome-shell-system-monitor-${version}"; @@ -19,7 +17,13 @@ stdenv.mkDerivation rec { libgtop ]; - patches = [ ./remove_nonexisting_mounts.patch ]; + patches = [ + (substituteAll { + src = ./paths_and_nonexisting_dirs.patch; + gtop_path = "${libgtop}/lib/girepository-1.0"; + glib_net_path = "${glib_networking}/lib/girepository-1.0"; + }) + ]; buildPhase = '' ${glib.dev}/bin/glib-compile-schemas --targetdir=${uuid}/schemas ${uuid}/schemas diff --git a/pkgs/desktops/gnome-3/extensions/system-monitor/remove_nonexisting_mounts.patch b/pkgs/desktops/gnome-3/extensions/system-monitor/paths_and_nonexisting_dirs.patch similarity index 52% rename from pkgs/desktops/gnome-3/extensions/system-monitor/remove_nonexisting_mounts.patch rename to pkgs/desktops/gnome-3/extensions/system-monitor/paths_and_nonexisting_dirs.patch index 8bff7fbe24fe..82e3d7c541ba 100644 --- a/pkgs/desktops/gnome-3/extensions/system-monitor/remove_nonexisting_mounts.patch +++ b/pkgs/desktops/gnome-3/extensions/system-monitor/paths_and_nonexisting_dirs.patch @@ -1,8 +1,18 @@ diff --git a/system-monitor@paradoxxx.zero.gmail.com/extension.js b/system-monitor@paradoxxx.zero.gmail.com/extension.js -index b4b7f15..d645654 100644 +index b4b7f15..d139135 100644 --- a/system-monitor@paradoxxx.zero.gmail.com/extension.js +++ b/system-monitor@paradoxxx.zero.gmail.com/extension.js -@@ -386,7 +386,7 @@ const smMountsMonitor = new Lang.Class({ +@@ -18,6 +18,9 @@ + + // Author: Florian Mounier aka paradoxxxzero + ++imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@'); ++imports.gi.GIRepository.Repository.prepend_search_path('@glib_net_path@'); ++ + /* 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 */ + const libnm_glib = imports.gi.GIRepository.Repository.get_default().is_registered("NMClient", "1.0"); +@@ -386,7 +389,7 @@ const smMountsMonitor = new Lang.Class({ connected: false, _init: function () { this._volumeMonitor = Gio.VolumeMonitor.get();