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