gzdoom: add desktop item

This commit is contained in:
Sander van der Burg 2021-08-06 00:03:52 +02:00
parent 439b160522
commit 246ac3167d

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, openal, fluidsynth_1 { lib, stdenv, fetchFromGitHub, cmake, makeWrapper, openal, fluidsynth_1
, soundfont-fluid, libGL, SDL2, bzip2, zlib, libjpeg, libsndfile, mpg123 , soundfont-fluid, libGL, SDL2, bzip2, zlib, libjpeg, libsndfile, mpg123
, game-music-emu, pkg-config }: , game-music-emu, pkg-config, copyDesktopItems, makeDesktopItem }:
let let
zmusic-src = fetchFromGitHub { zmusic-src = fetchFromGitHub {
@ -38,7 +38,7 @@ let
fetchSubmodules = true; fetchSubmodules = true;
}; };
nativeBuildInputs = [ cmake makeWrapper pkg-config ]; nativeBuildInputs = [ cmake makeWrapper pkg-config copyDesktopItems ];
buildInputs = [ buildInputs = [
SDL2 SDL2
libGL libGL
@ -55,7 +55,18 @@ let
NIX_CFLAGS_LINK = "-lopenal -lfluidsynth"; NIX_CFLAGS_LINK = "-lopenal -lfluidsynth";
desktopItems = [
(makeDesktopItem {
name = "gzdoom";
exec = "gzdoom";
desktopName = "GZDoom";
categories = "Game;";
})
];
installPhase = '' installPhase = ''
runHook preInstall
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom" install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
for i in *.pk3; do for i in *.pk3; do
install -Dm644 "$i" "$out/lib/gzdoom/$i" install -Dm644 "$i" "$out/lib/gzdoom/$i"
@ -68,6 +79,8 @@ let
done done
mkdir $out/bin mkdir $out/bin
makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {