Merge pull request #132826 from svanderburg/add-desktopitems

Add desktopitems for some classic games
This commit is contained in:
Sander van der Burg 2021-08-07 20:32:00 +02:00 committed by GitHub
commit 8fa19a7a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 5 deletions

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, cmake, SDL2, libGLU, libGL, zlib, libjpeg, libogg, libvorbis
, openal, curl }:
, openal, curl, copyDesktopItems, makeDesktopItem }:
stdenv.mkDerivation rec {
pname = "dhewm3";
@ -21,9 +21,18 @@ stdenv.mkDerivation rec {
cd "$(ls -d dhewm3-*.src)"/neo
'';
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake copyDesktopItems ];
buildInputs = [ SDL2 libGLU libGL zlib libjpeg libogg libvorbis openal curl ];
desktopItems = [
(makeDesktopItem {
name = "dhewm3";
exec = "dhewm3";
desktopName = "Doom 3";
categories = "Game;";
})
];
hardeningDisable = [ "format" ];
meta = with lib; {

View File

@ -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; {

View File

@ -1,4 +1,4 @@
{ lib, stdenv, SDL, fetchurl, gzip, libvorbis, libmad }:
{ lib, stdenv, SDL, fetchurl, gzip, libvorbis, libmad, copyDesktopItems, makeDesktopItem }:
stdenv.mkDerivation rec {
pname = "quakespasm";
@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
sourceRoot = "${pname}-${version}/Quake";
nativeBuildInputs = [ copyDesktopItems ];
buildInputs = [
gzip SDL libvorbis libmad
];
@ -25,6 +26,15 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
desktopItems = [
(makeDesktopItem {
name = "quakespasm";
exec = "quake";
desktopName = "Quakespasm";
categories = "Game;";
})
];
meta = with lib; {
description = "An engine for iD software's Quake";
homepage = "http://quakespasm.sourceforge.net/";