about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-10-22 18:48:00 +0300
committerAzat Bahawi <azat@bahawi.net>2023-10-22 18:48:00 +0300
commit5cee55a7fe1674ac45d9306721d8f802fdb174f5 (patch)
treee4c63e8875641f00ae8496422e81081a887f7e18 /pkgs/games
parent3ee292871073182a168a3b30a3948337ea7040ee (diff)
gzdoom: fix desktop item
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/doom-ports/gzdoom/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/games/doom-ports/gzdoom/default.nix b/pkgs/games/doom-ports/gzdoom/default.nix
index 4d737c6493342..b8d273c543579 100644
--- a/pkgs/games/doom-ports/gzdoom/default.nix
+++ b/pkgs/games/doom-ports/gzdoom/default.nix
@@ -10,6 +10,7 @@
 , fluidsynth
 , game-music-emu
 , gtk3
+, imagemagick
 , libGL
 , libjpeg
 , libsndfile
@@ -41,6 +42,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     cmake
     copyDesktopItems
+    imagemagick
     makeWrapper
     ninja
     pkg-config
@@ -81,6 +83,8 @@ stdenv.mkDerivation rec {
       name = "gzdoom";
       exec = "gzdoom";
       desktopName = "GZDoom";
+      comment = meta.description;
+      icon = "gzdoom";
       categories = [ "Game" ];
     })
   ];
@@ -88,6 +92,12 @@ stdenv.mkDerivation rec {
   postInstall = ''
     mv $out/bin/gzdoom $out/share/games/doom/gzdoom
     makeWrapper $out/share/games/doom/gzdoom $out/bin/gzdoom
+
+    for size in 16 24 32 48 64 128; do
+      mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
+      convert -background none -resize "$size"x"$size" $src/src/win32/icon1.ico -flatten \
+        $out/share/icons/hicolor/"$size"x"$size"/apps/gzdoom.png
+    done;
   '';
 
   meta = with lib; {