about summary refs log tree commit diff
path: root/pkgs/applications/graphics/goxel/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/goxel/default.nix')
-rw-r--r--pkgs/applications/graphics/goxel/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/goxel/default.nix b/pkgs/applications/graphics/goxel/default.nix
index 16b3a8c5037b1..cf3a31a1d4bf1 100644
--- a/pkgs/applications/graphics/goxel/default.nix
+++ b/pkgs/applications/graphics/goxel/default.nix
@@ -21,6 +21,14 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     install -D ./goxel $out/bin/goxel
+
+    for res in $(ls data/icons | sed -e 's/icon//g' -e 's/.png//g'); do
+      install -Dm444 data/icons/icon$res.png $out/share/icons/hicolor/''${res}x''${res}/apps/goxel.png
+    done
+
+    install -Dm444 snap/gui/goxel.desktop -t $out/share/applications
+    substituteInPlace $out/share/applications/goxel.desktop \
+      --replace 'Icon=''${SNAP}/icon.png' 'Icon=goxel'
   '';
 
   meta = with lib; {