about summary refs log tree commit diff
path: root/pkgs/desktops/cinnamon
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2024-03-26 22:50:53 +0800
committerMaxine Aubrey <max@ine.dev>2024-04-22 21:11:25 +0200
commit7fbd6fefeafeb8f7520f37188a6d4398bce09c21 (patch)
tree2bbd7350a3c913e7fab4291f202185f310316e4d /pkgs/desktops/cinnamon
parentfae132c6e3b5784069f7ee8540db2c3135a0330f (diff)
cinnamon.cinnamon-common: Do not install online accounts module
Use GNOME Online Accounts GTK instead.
Diffstat (limited to 'pkgs/desktops/cinnamon')
-rw-r--r--pkgs/desktops/cinnamon/cinnamon-common/default.nix27
1 files changed, 20 insertions, 7 deletions
diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix
index 957739980746e..114a75fc23d14 100644
--- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix
+++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix
@@ -9,6 +9,7 @@
 , cjs
 , evolution-data-server
 , fetchFromGitHub
+, fetchpatch
 , gdk-pixbuf
 , gettext
 , libgnomekbd
@@ -83,6 +84,13 @@ stdenv.mkDerivation rec {
   patches = [
     ./use-sane-install-dir.patch
     ./libdir.patch
+
+    # Switch to GNOME Online Accounts GTK
+    (fetchpatch {
+      url = "https://github.com/linuxmint/cinnamon/commit/d22f889c376734f0ca5d904885c2772e790fbadc.patch";
+      includes = [ "files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py" ];
+      hash = "sha256-xutJqxtzk3/BUQGZY/tnBkRyAfZZY7AckaGC6b7Sfn8=";
+    })
   ];
 
   buildInputs = [
@@ -140,13 +148,6 @@ stdenv.mkDerivation rec {
     pkg-config
   ];
 
-  # Use locales from cinnamon-translations.
-  # FIXME: Upstream does not respect localedir option from Meson currently.
-  # https://github.com/linuxmint/cinnamon/pull/11244#issuecomment-1305855783
-  postInstall = ''
-    ln -s ${cinnamon-translations}/share/locale $out/share/locale
-  '';
-
   postPatch = ''
     find . -type f -exec sed -i \
       -e s,/usr/share/cinnamon,$out/share/cinnamon,g \
@@ -173,6 +174,18 @@ stdenv.mkDerivation rec {
     patchShebangs src/data-to-c.pl
   '';
 
+  postInstall = ''
+    # Use locales from cinnamon-translations.
+    ln -s ${cinnamon-translations}/share/locale $out/share/locale
+
+    # Do not install online accounts module, with a -Donlineaccounts=false c-c-c
+    # this just shows an empty page.
+    rm -f $out/share/cinnamon/cinnamon-settings/modules/cs_online_accounts.py
+
+    # g-o-a-gtk already provides its own desktop item.
+    rm -f $out/share/applications/cinnamon-settings-online-accounts.desktop
+  '';
+
   preFixup = ''
     # https://github.com/NixOS/nixpkgs/issues/101881
     gappsWrapperArgs+=(