summary refs log tree commit diff
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2021-08-06 00:03:52 +0200
committerSander van der Burg <svanderburg@gmail.com>2021-08-06 22:14:39 +0200
commit246ac3167d82c7adafed4a861ddb71817810586c (patch)
treef059e352604fd4cb5906f881e9248c98a528b79b
parent439b1605227b8adb1357b55ce8529d541abbe9eb (diff)
downloadnixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.tar
nixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.tar.gz
nixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.tar.bz2
nixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.tar.lz
nixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.tar.xz
nixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.tar.zst
nixpkgs-246ac3167d82c7adafed4a861ddb71817810586c.zip
gzdoom: add desktop item
-rw-r--r--pkgs/games/gzdoom/default.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/games/gzdoom/default.nix b/pkgs/games/gzdoom/default.nix
index 8ab54468c00..787184273fc 100644
--- a/pkgs/games/gzdoom/default.nix
+++ b/pkgs/games/gzdoom/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, cmake, makeWrapper, openal, fluidsynth_1
 , soundfont-fluid, libGL, SDL2, bzip2, zlib, libjpeg, libsndfile, mpg123
-, game-music-emu, pkg-config }:
+, game-music-emu, pkg-config, copyDesktopItems, makeDesktopItem }:
 
 let
   zmusic-src = fetchFromGitHub {
@@ -38,7 +38,7 @@ let
       fetchSubmodules = true;
     };
 
-    nativeBuildInputs = [ cmake makeWrapper pkg-config ];
+    nativeBuildInputs = [ cmake makeWrapper pkg-config copyDesktopItems ];
     buildInputs = [
       SDL2
       libGL
@@ -55,7 +55,18 @@ let
 
     NIX_CFLAGS_LINK = "-lopenal -lfluidsynth";
 
+    desktopItems = [
+      (makeDesktopItem {
+        name = "gzdoom";
+        exec = "gzdoom";
+        desktopName = "GZDoom";
+        categories = "Game;";
+      })
+    ];
+
     installPhase = ''
+      runHook preInstall
+
       install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
       for i in *.pk3; do
         install -Dm644 "$i" "$out/lib/gzdoom/$i"
@@ -68,6 +79,8 @@ let
       done
       mkdir $out/bin
       makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
+
+      runHook postInstall
     '';
 
     meta = with lib; {