2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, scons
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2022-09-30 11:47:45 +00:00
|
|
|
, SDL2
|
|
|
|
, SDL2_image
|
|
|
|
, SDL2_mixer
|
2020-04-24 23:36:52 +00:00
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, libpng
|
|
|
|
, physfs
|
2024-02-29 20:09:43 +00:00
|
|
|
, unstableGitUpdater
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
music = fetchurl {
|
|
|
|
url = "https://www.dxx-rebirth.com/download/dxx/res/d2xr-sc55-music.dxa";
|
|
|
|
sha256 = "05mz77vml396mff43dbs50524rlm4fyds6widypagfbh5hc55qdc";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dxx-rebirth";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0-unstable-2024-01-13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dxx-rebirth";
|
|
|
|
repo = "dxx-rebirth";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "5c710857a9312e1b2f3249c51c12b55f9390a2b1";
|
|
|
|
hash = "sha256-nEPMJiTeePAmourAksUNqyy5whs+8+qy/qrycfNw2lo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config scons ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
buildInputs = [ libGLU libGL libpng physfs SDL2 SDL2_image SDL2_mixer ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
sconsFlags = [ "sdl2=1" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Wno-format-nonliteral"
|
|
|
|
"-Wno-format-truncation"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 ${music} $out/share/games/dxx-rebirth/${music.name}
|
|
|
|
install -Dm644 -t $out/share/doc/dxx-rebirth *.txt
|
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater {};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Source Port of the Descent 1 and 2 engines";
|
|
|
|
homepage = "https://www.dxx-rebirth.com/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|