lol

ioquake3: cleanup

- Fix `ioquake3`
- Remove the arch suffix from the binaries (`ioquake3.x86-64` -> `ioquake3`, `ioq3ded.x86-64` -> `ioq3ded`)
- Add `.desktop` file
- Remove unneeded dependencies
- Clean-up installation phase
- Add `meta.mainProgram` attribute
- Add myself in the maintainer list

+39 -19
+39 -19
pkgs/games/quake3/ioquake/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , fetchFromGitHub 4 - , which 5 4 , pkg-config 5 + , which 6 + , copyDesktopItems 7 + , makeBinaryWrapper 6 8 , SDL2 7 9 , libGL 8 - , openalSoft 10 + , openal 9 11 , curl 10 12 , speex 11 13 , opusfile 12 14 , libogg 13 15 , libvorbis 14 - , libopus 15 16 , libjpeg 16 - , mumble 17 + , makeDesktopItem 17 18 , freetype 18 19 }: 19 20 20 21 stdenv.mkDerivation { 21 22 pname = "ioquake3"; 22 - version = "unstable-2022-11-24"; 23 + version = "unstable-2023-08-13"; 23 24 24 25 src = fetchFromGitHub { 25 26 owner = "ioquake"; 26 27 repo = "ioq3"; 27 - rev = "70d07d91d62dcdd2f2268d1ac401bfb697b4c991"; 28 - sha256 = "sha256-WDjR0ik+xAs6OA1DNbUGIF1MXSuEoy8nNkPiHaegfF0="; 28 + rev = "ee950eb7b0e41437cc23a9943254c958da8a61ab"; 29 + sha256 = "sha256-NfhInwrtw85i2mnv7EtBrrpNaslaQaVhLNlK0I9aYto="; 29 30 }; 30 31 31 - nativeBuildInputs = [ which pkg-config ]; 32 + nativeBuildInputs = [ 33 + copyDesktopItems 34 + makeBinaryWrapper 35 + pkg-config 36 + which 37 + ]; 38 + 32 39 buildInputs = [ 33 40 SDL2 34 41 libGL 35 - openalSoft 42 + openal 36 43 curl 37 44 speex 38 45 opusfile 39 46 libogg 40 47 libvorbis 41 - libopus 42 48 libjpeg 43 49 freetype 44 - mumble 45 50 ]; 46 51 47 52 enableParallelBuilding = true; ··· 50 55 51 56 installTargets = [ "copyfiles" ]; 52 57 53 - installFlags = [ "COPYDIR=$(out)" "COPYBINDIR=$(out)/bin" ]; 58 + installFlags = [ "COPYDIR=$(out)/share/ioquake3" ]; 54 59 55 - preInstall = '' 56 - mkdir -p $out/baseq3 $out/bin 60 + postInstall = '' 61 + install -Dm644 misc/quake3.svg $out/share/icons/hicolor/scalable/apps/ioquake3.svg 62 + 63 + makeWrapper $out/share/ioquake3/ioquake3.* $out/bin/ioquake3 64 + makeWrapper $out/share/ioquake3/ioq3ded.* $out/bin/ioq3ded 57 65 ''; 58 66 59 - meta = with lib; { 67 + desktopItems = [ 68 + (makeDesktopItem { 69 + name = "IOQuake3"; 70 + exec = "ioquake3"; 71 + icon = "ioquake3"; 72 + comment = "A fast-paced 3D first-person shooter, a community effort to continue supporting/developing id's Quake III Arena"; 73 + desktopName = "ioquake3"; 74 + categories = [ "Game" "ActionGame" ]; 75 + }) 76 + ]; 77 + 78 + meta = { 60 79 homepage = "https://ioquake3.org/"; 61 - description = "First person shooter engine based on the Quake 3: Arena and Quake 3: Team Arena"; 62 - license = licenses.gpl2Only; 63 - platforms = platforms.linux; 64 - maintainers = with maintainers; [ rvolosatovs eelco abbradar ]; 80 + description = "A fast-paced 3D first-person shooter, a community effort to continue supporting/developing id's Quake III Arena"; 81 + license = lib.licenses.gpl2Only; 82 + mainProgram = "ioquake3"; 83 + maintainers = with lib.maintainers; [ abbradar drupol eelco rvolosatovs ]; 84 + platforms = lib.platforms.linux; 65 85 }; 66 86 }