about summary refs log tree commit diff
path: root/pkgs/applications/office/zim
diff options
context:
space:
mode:
authorAidan Gauland <aidalgol@fastmail.net>2023-05-15 10:28:32 +1200
committerAidan Gauland <aidalgol@fastmail.net>2023-06-11 16:40:39 +1200
commitd1b239ac5dc9d1a0bc9e8f5ebf3653c293a9e8ea (patch)
tree7afa30954b23460240bb1490d05ad63b7480afba /pkgs/applications/office/zim
parentb9f18832c1256ab6f86bdcdf7bd83ddb70af9372 (diff)
zim: install desktop application icon
Diffstat (limited to 'pkgs/applications/office/zim')
-rw-r--r--pkgs/applications/office/zim/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/applications/office/zim/default.nix b/pkgs/applications/office/zim/default.nix
index c20c9449ae842..c9e787f6d9a71 100644
--- a/pkgs/applications/office/zim/default.nix
+++ b/pkgs/applications/office/zim/default.nix
@@ -27,6 +27,20 @@ python3Packages.buildPythonApplication rec {
     makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
+  postInstall = ''
+    (
+      cd icons
+      for img in *.{png,svg}; do
+        size=''${img#zim}
+        size=''${size%.png}
+        size=''${size%.svg}
+        dimensions="''${size}x''${size}"
+        mkdir -p $out/share/icons/hicolor/$dimensions/apps
+        cp $img $out/share/icons/hicolor/$dimensions/apps/${pname}.png
+      done
+    )
+  '';
+
   # RuntimeError: could not create GtkClipboard object
   doCheck = false;