pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / dxx-rebirth / default.nix
blob604caffaf06d5bdca2ff5c2a33ec61b952963330
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchurl
4 , scons
5 , pkg-config
6 , SDL2
7 , SDL2_image
8 , SDL2_mixer
9 , libGLU
10 , libGL
11 , libpng
12 , physfs
13 , unstableGitUpdater
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 = "0.60.0-beta2-unstable-2024-08-11";
27   src = fetchFromGitHub {
28     owner = "dxx-rebirth";
29     repo = "dxx-rebirth";
30     rev = "bd3c033bdf1faa4606086dcae0436531fb2e7e5c";
31     hash = "sha256-imNHJ55Wp3YueMsNVvb7Z51EyESZnPdtzAOp2TWfdqc=";
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   passthru.updateScript = unstableGitUpdater {};
54   meta = with lib; {
55     description = "Source Port of the Descent 1 and 2 engines";
56     homepage = "https://www.dxx-rebirth.com/";
57     license = licenses.gpl3;
58     maintainers = with maintainers; [ peterhoeg ];
59     platforms = with platforms; linux;
60   };