python312Packages.icontract: relax deps (#380554)
[NixPkgs.git] / pkgs / by-name / da / darkplaces / package.nix
blobdd0bf83fceb70ef2c086c501a2220e59c4d5ec81
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   zlib,
6   libjpeg,
7   SDL2,
8   libvorbis,
9 }:
10 stdenv.mkDerivation rec {
11   pname = "darkplaces";
12   version = "unstable-2022-05-10";
14   src = fetchFromGitHub {
15     owner = "DarkPlacesEngine";
16     repo = "darkplaces";
17     rev = "f16954a9d40168253ac5d9890dabcf7dbd266cd9";
18     hash = "sha256-5KsUcgHbuzFUE6LcclqI8VPSFbXZzBnxzOBB9Kf8krI=";
19   };
21   buildInputs = [
22     zlib
23     libjpeg
24     SDL2
25   ];
27   buildFlags = [ "release" ];
29   installPhase = ''
30     runHook preInstall
32     mkdir -p $out/bin
33     install -m755 darkplaces-sdl $out/bin/darkplaces
34     install -m755 darkplaces-dedicated $out/bin/darkplaces-dedicated
36     runHook postInstall
37   '';
39   postFixup = ''
40     patchelf \
41       --add-needed ${libvorbis}/lib/libvorbisfile.so \
42       --add-needed ${libvorbis}/lib/libvorbis.so \
43       $out/bin/darkplaces
44   '';
46   meta = with lib; {
47     homepage = "https://www.icculus.org/twilight/darkplaces/";
48     description = "Quake 1 engine implementation by LadyHavoc";
49     longDescription = ''
50       A game engine based on the Quake 1 engine by id Software.
51       It improves and builds upon the original 1996 engine by adding modern
52       rendering features, and expanding upon the engine's native game code
53       language QuakeC, as well as supporting additional map and model formats.
54     '';
55     maintainers = with maintainers; [ necrophcodr ];
56     license = licenses.gpl2Plus;
57     platforms = platforms.linux;
58   };