about summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2023-06-01 19:37:27 +0800
committerBobby Rong <rjl931189261@126.com>2023-06-14 14:14:57 +0800
commit79b41ca7c1e35bbb8fcbe10f1b6ca125187ef122 (patch)
tree505d70d0ea07cd71f3101512ef22ce2cfe1a0a50 /pkgs/desktops
parentc33ef407cdea9a63490dcb20bb7817696489d7ad (diff)
cinnamon.folder-color-switcher: 1.5.5 -> 1.5.7
https://github.com/linuxmint/folder-color-switcher/compare/5e0b768b...03311d62
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/cinnamon/folder-color-switcher/default.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/desktops/cinnamon/folder-color-switcher/default.nix b/pkgs/desktops/cinnamon/folder-color-switcher/default.nix
index a3909b820ba92..cc7f7e7cdcf6f 100644
--- a/pkgs/desktops/cinnamon/folder-color-switcher/default.nix
+++ b/pkgs/desktops/cinnamon/folder-color-switcher/default.nix
@@ -2,27 +2,34 @@
 , lib
 , fetchFromGitHub
 , gettext
+, python3
 }:
 
 stdenvNoCC.mkDerivation rec {
   pname = "folder-color-switcher";
-  version = "1.5.5";
+  version = "1.5.7";
 
   src = fetchFromGitHub {
     owner = "linuxmint";
     repo = pname;
     # They don't really do tags, this is just a named commit.
-    rev = "5e0b768b3a5bf88a828a2489b9428997b797c1ed";
-    sha256 = "sha256-DU75LM5v2/E/ZmqQgyiPsOOEUw9QQ/NXNtGDFzzYvyY=";
+    rev = "03311d62a62e2cd7d0592b241c287091161ec6b6";
+    sha256 = "sha256-HQv9vSpRSBjqbncGFv+O5XQtRJ+4Cq0aWZHoj5BhKYE=";
   };
 
   nativeBuildInputs = [
     gettext
+    python3.pkgs.wrapPython
   ];
 
   postPatch = ''
     substituteInPlace usr/share/nemo-python/extensions/nemo-folder-color-switcher.py \
-      --replace "/usr/share" "$out/share"
+      --replace "/usr/share/locale" "$out/share" \
+      --replace "/usr/share/folder-color-switcher/colors.d" "/run/current-system/sw/share/folder-color-switcher/colors.d" \
+      --replace "/usr/share/folder-color-switcher/color.svg" "$out/share/folder-color-switcher/color.svg"
+
+    substituteInPlace usr/share/caja-python/extensions/caja-folder-color-switcher.py \
+      --replace "/usr/share/folder-color-switcher/colors.d" "/run/current-system/sw/share/folder-color-switcher/colors.d"
   '';
 
   installPhase = ''
@@ -34,6 +41,13 @@ stdenvNoCC.mkDerivation rec {
     runHook postInstall
   '';
 
+  preFixup = ''
+    # For Gdk.cairo_surface_create_from_pixbuf()
+    # TypeError: Couldn't find foreign struct converter for 'cairo.Surface'
+    buildPythonPath ${python3.pkgs.pycairo}
+    patchPythonScript $out/share/nemo-python/extensions/nemo-folder-color-switcher.py
+  '';
+
   meta = with lib; {
     homepage = "https://github.com/linuxmint/folder-color-switcher";
     description = "Change folder colors for Nemo and Caja";