2018-03-07 04:56:33 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, scons, pkgconfig
|
2018-02-24 14:12:44 +01:00
|
|
|
, SDL, SDL_mixer, libGLU_combined, physfs
|
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";
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "dxx-rebirth";
|
2018-01-15 03:53:21 +01:00
|
|
|
version = "0.59.100";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-03-25 07:04:25 +02:00
|
|
|
url = "https://www.dxx-rebirth.com/download/dxx/dxx-rebirth_v${version}-src.tar.gz";
|
2018-01-15 03:53:21 +01:00
|
|
|
sha256 = "0m9k34zyr8bbni9szip407mffdpwbqszgfggavgqjwq0k9c1w7ka";
|
|
|
|
};
|
|
|
|
|
2018-03-07 04:56:33 +01:00
|
|
|
# TODO: drop these when upgrading to version > 0.59.100
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "dxx-gcc7-fix1.patch";
|
|
|
|
url = "https://github.com/dxx-rebirth/dxx-rebirth/commit/1ed7cec714c623758e3418ec69eaf3b3ff03e9f6.patch";
|
|
|
|
sha256 = "026pn8xglmxryaj8555h5rhzkx30lxmksja1fzdlfyb1vll75gq0";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "dxx-gcc7-fix2.patch";
|
|
|
|
url = "https://github.com/dxx-rebirth/dxx-rebirth/commit/73057ad8ec6977ac747637db1080686f11b4c3cc.patch";
|
|
|
|
sha256 = "0s506vdd2djrrm3xl0ygn9ylpg6y8qxii2nnzk3sf9133glp3swy";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-01-15 03:53:21 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig scons ];
|
|
|
|
|
2018-02-24 14:12:44 +01:00
|
|
|
buildInputs = [ libGLU_combined physfs SDL SDL_mixer ];
|
2018-01-15 03:53:21 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-07-21 11:15:44 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral";
|
2018-06-11 02:32:31 +02:00
|
|
|
|
2018-11-12 03:52:07 +01:00
|
|
|
postInstall = ''
|
2018-01-15 03:53:21 +01:00
|
|
|
install -Dm644 ${music} $out/share/games/dxx-rebirth/d2xr-sc55-music.dxa
|
|
|
|
install -Dm644 -t $out/share/doc/dxx-rebirth *.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Source Port of the Descent 1 and 2 engines";
|
2018-03-25 07:04:25 +02:00
|
|
|
homepage = https://www.dxx-rebirth.com/;
|
2018-01-15 03:53:21 +01:00
|
|
|
license = licenses.free;
|
2018-07-22 21:50:19 +02:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2018-01-15 03:53:21 +01:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|