Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / dxx-rebirth / default.nix
blob95cf0918b52caeb868d04f61bdfa09195c7af1b3
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchurl
4 , fetchpatch
5 , scons
6 , pkg-config
7 , SDL2
8 , SDL2_image
9 , SDL2_mixer
10 , libGLU
11 , libGL
12 , libpng
13 , physfs
16 let
17   music = fetchurl {
18     url = "https://www.dxx-rebirth.com/download/dxx/res/d2xr-sc55-music.dxa";
19     sha256 = "05mz77vml396mff43dbs50524rlm4fyds6widypagfbh5hc55qdc";
20   };
23 stdenv.mkDerivation rec {
24   pname = "dxx-rebirth";
25   version = "unstable-2023-03-23";
27   src = fetchFromGitHub {
28     owner = "dxx-rebirth";
29     repo = "dxx-rebirth";
30     rev = "841ebcc11d249febe48911bc239606ade3bd78b3";
31     hash = "sha256-cr5QdkKO/HNvtc2w4ynJixuLauhPCwtsSC3UEV7+C1A=";
32   };
34   nativeBuildInputs = [ pkg-config scons ];
36   buildInputs = [ libGLU libGL libpng physfs SDL2 SDL2_image SDL2_mixer ];
38   enableParallelBuilding = true;
40   sconsFlags = [ "sdl2=1" ];
42   env.NIX_CFLAGS_COMPILE = toString [
43     "-Wno-format-nonliteral"
44     "-Wno-format-truncation"
45   ];
47   postInstall = ''
48     install -Dm644 ${music} $out/share/games/dxx-rebirth/${music.name}
49     install -Dm644 -t $out/share/doc/dxx-rebirth *.txt
50   '';
52   meta = with lib; {
53     description = "Source Port of the Descent 1 and 2 engines";
54     homepage = "https://www.dxx-rebirth.com/";
55     license = licenses.gpl3;
56     maintainers = with maintainers; [ peterhoeg ];
57     platforms = with platforms; linux;
58   };