From 279fb9d46472e7996ebeda67568931d66efeb2d3 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Mon, 30 Jan 2023 19:13:52 +0800 Subject: [PATCH 1/6] cinnamon.cinnamon-common: stop substituting upload-system-info We install xapp in environment.systemPackages in the cinnamon module because most XApps need the icon it provides. As a side effect, we should have this in PATH. This is really an optional app, cinnamon-settings handles the situation well when it is missing. --- pkgs/desktops/cinnamon/cinnamon-common/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix index 158e72587a73..e241d8048f57 100644 --- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix @@ -153,8 +153,6 @@ stdenv.mkDerivation rec { sed "s|/usr/share/%s|/run/current-system/sw/share/%s|g" -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_themes.py - sed "s|\"upload-system-info\"|\"${xapp}/bin/upload-system-info\"|g" -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py - sed "s|/usr/bin/cinnamon-screensaver-command|/run/current-system/sw/bin/cinnamon-screensaver-command|g" \ -i ./files/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js -i ./files/usr/share/cinnamon/applets/user@cinnamon.org/applet.js From 63a4f9f24214ee9c152ff3687dc26cadbfb4939d Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Mon, 30 Jan 2023 19:32:21 +0800 Subject: [PATCH 2/6] cinnamon.cinnamon-common: use mesa instead of clutter This is probably a mistake I made when bumping cinnamon to 5.4. What cinnamon needs is muffin-clutter-0, the clutter package itself is something no longer maintained. We just add the missing mesa for the EGL/eglmesaext.h header. --- pkgs/desktops/cinnamon/cinnamon-common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix index e241d8048f57..36f49c828f2a 100644 --- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix @@ -7,7 +7,6 @@ , cinnamon-session , cinnamon-translations , cjs -, clutter , fetchFromGitHub , gdk-pixbuf , gettext @@ -23,6 +22,7 @@ , libstartup_notification , libXtst , libXdamage +, mesa , muffin , networkmanager , pkg-config @@ -89,7 +89,6 @@ stdenv.mkDerivation rec { cinnamon-desktop cinnamon-menus cjs - clutter dbus gdk-pixbuf glib @@ -100,6 +99,7 @@ stdenv.mkDerivation rec { libstartup_notification libXtst libXdamage + mesa muffin networkmanager polkit From 7f5ad3e298a3e83e01f76619d7b65c91182e9922 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 31 Jan 2023 14:34:13 +0800 Subject: [PATCH 3/6] cinnamon.cinnamon-common: unbreak looking-glass Reported in issue 213728. ModuleNotFoundError: No module named 'pyinotify' --- pkgs/desktops/cinnamon/cinnamon-common/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix index 36f49c828f2a..76d91a2076de 100644 --- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix @@ -76,6 +76,7 @@ stdenv.mkDerivation rec { pycairo python3.pkgs.xapp # The scope prefix is required pillow + pyinotify # for looking-glass pytz tinycss2 python-pam From bdc6404b0f8bea200b3633431814d700c612b04b Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 31 Jan 2023 14:43:11 +0800 Subject: [PATCH 4/6] cinnamon.cinnamon-common: unbreak calendar-server Reported in issue 213728. With this change you can see list of your EDS events in your calendar applet. --- nixos/modules/services/x11/desktop-managers/cinnamon.nix | 2 ++ pkgs/desktops/cinnamon/cinnamon-common/default.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index a693f3e2379a..b910c09fd836 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -109,6 +109,7 @@ in xapp ]; services.cinnamon.apps.enable = mkDefault true; + services.gnome.evolution-data-server.enable = true; services.gnome.glib-networking.enable = true; services.gnome.gnome-keyring.enable = true; services.gvfs.enable = true; @@ -232,6 +233,7 @@ in # external apps shipped with linux-mint hexchat gnome-calculator + gnome-calendar gnome-screenshot ] config.environment.cinnamon.excludePackages; }) diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix index 76d91a2076de..bd2e2a32cd76 100644 --- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix @@ -7,6 +7,7 @@ , cinnamon-session , cinnamon-translations , cjs +, evolution-data-server , fetchFromGitHub , gdk-pixbuf , gettext @@ -91,6 +92,7 @@ stdenv.mkDerivation rec { cinnamon-menus cjs dbus + evolution-data-server # for calendar-server gdk-pixbuf glib gsound From fa9ad6e624cc634263d4b79690af0fff03a3a9ab Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 31 Jan 2023 15:24:44 +0800 Subject: [PATCH 5/6] nixos/cinnamon: don't install evince On Linux Mint this is a symbolic link of xreader, we don't need two PDF readers that does the same thing. --- nixos/modules/services/x11/desktop-managers/cinnamon.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index b910c09fd836..2d8addb0f10e 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -215,7 +215,6 @@ in programs.geary.enable = mkDefault true; programs.gnome-disks.enable = mkDefault true; programs.gnome-terminal.enable = mkDefault true; - programs.evince.enable = mkDefault true; programs.file-roller.enable = mkDefault true; environment.systemPackages = with pkgs // pkgs.gnome // pkgs.cinnamon; utils.removePackagesByName [ From 6997aefc84d092acf94ef0b7d97e1fe6e01af7d2 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Mon, 30 Jan 2023 19:24:17 +0800 Subject: [PATCH 6/6] cinnamon.cinnamon-common: use correct python for scrollbar-test-widget.py Loading Themes module Traceback (most recent call last): File "/xxxxxx/share/cinnamon/cinnamon-settings/bin/scrollbar-test-widget.py", line 6, in import gi ModuleNotFoundError: No module named 'gi' This file is being called as Gio.Subprocess.new(['python3', '/xxxxxx/scrollbar-test-widget.py', str(self.content_widget.get_id())], Gio.SubprocessFlags.NONE) --- .../cinnamon/cinnamon-common/default.nix | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix index bd2e2a32cd76..ef3013f2e404 100644 --- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix @@ -53,6 +53,23 @@ , perl }: +let + pythonEnv = python3.withPackages (pp: with pp; [ + dbus-python + setproctitle + pygobject3 + pycairo + pp.xapp # don't omit `pp.`, see #213561 + pillow + pyinotify # for looking-glass + pytz + tinycss2 + python-pam + pexpect + distro + requests + ]); +in stdenv.mkDerivation rec { pname = "cinnamon-common"; version = "5.6.7"; @@ -70,21 +87,6 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - (python3.withPackages (pp: with pp; [ - dbus-python - setproctitle - pygobject3 - pycairo - python3.pkgs.xapp # The scope prefix is required - pillow - pyinotify # for looking-glass - pytz - tinycss2 - python-pam - pexpect - distro - requests - ])) atk cacert cinnamon-control-center @@ -106,6 +108,7 @@ stdenv.mkDerivation rec { muffin networkmanager polkit + pythonEnv libxml2 libgnomekbd gst_all_1.gstreamer @@ -154,6 +157,8 @@ stdenv.mkDerivation rec { sed "s|/usr/share/sounds|/run/current-system/sw/share/sounds|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/SettingsWidgets.py + sed "s|'python3'|'${pythonEnv.interpreter}'|g" -i ./files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py + sed "s|/usr/share/%s|/run/current-system/sw/share/%s|g" -i ./files/usr/share/cinnamon/cinnamon-settings/modules/cs_themes.py sed "s|/usr/bin/cinnamon-screensaver-command|/run/current-system/sw/bin/cinnamon-screensaver-command|g" \