quake3e: add desktop-icon

This commit is contained in:
Felix Buehler 2024-01-07 22:45:45 +01:00
parent bb7d124cb5
commit 6f78b90a8c

View file

@ -1,5 +1,19 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper { lib
, curl, libGL, libX11, libXxf86dga, alsa-lib, libXrandr, libXxf86vm, libXext, SDL2, glibc , stdenv
, fetchFromGitHub
, makeWrapper
, curl
, libGL
, libX11
, libXxf86dga
, alsa-lib
, libXrandr
, libXxf86vm
, libXext
, SDL2
, glibc
, copyDesktopItems
, makeDesktopItem
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -13,7 +27,7 @@ stdenv.mkDerivation rec {
sha256 = "0qd13fndbhgkkmhxbprpzmj2l2v9ihacxagpdqi9sg9nrzvahr9h"; sha256 = "0qd13fndbhgkkmhxbprpzmj2l2v9ihacxagpdqi9sg9nrzvahr9h";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper copyDesktopItems ];
buildInputs = [ curl libGL libX11 libXxf86dga alsa-lib libXrandr libXxf86vm libXext SDL2 glibc ]; buildInputs = [ curl libGL libX11 libXxf86dga alsa-lib libXrandr libXxf86vm libXext SDL2 glibc ];
env.NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2"; env.NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2";
enableParallelBuilding = true; enableParallelBuilding = true;
@ -36,11 +50,22 @@ stdenv.mkDerivation rec {
''; '';
installPhase = '' installPhase = ''
runHook preInstall
make install DESTDIR=$out/lib make install DESTDIR=$out/lib
makeWrapper $out/lib/quake3e.x64 $out/bin/quake3e makeWrapper $out/lib/quake3e.x64 $out/bin/quake3e
makeWrapper $out/lib/quake3e.ded.x64 $out/bin/quake3e.ded makeWrapper $out/lib/quake3e.ded.x64 $out/bin/quake3e.ded
runHook postInstall
''; '';
desktopItems = [
(makeDesktopItem {
name = "Quake3e";
exec = "quake3e";
desktopName = "Quake3e";
categories = [ "Game" ];
})
];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/ec-/Quake3e"; homepage = "https://github.com/ec-/Quake3e";
description = "Improved Quake III Arena engine"; description = "Improved Quake III Arena engine";