2018-07-23 22:27:03 +01:00
|
|
|
{ stdenv, fetchurl, SDL, SDL_mixer, SDL_net
|
|
|
|
, libGLU_combined ? assert false; null
|
|
|
|
, useOpenGL ? stdenv.hostPlatform == stdenv.buildPlatform
|
|
|
|
}:
|
2010-08-11 21:14:25 +01:00
|
|
|
|
2018-07-23 22:27:03 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2010-08-11 21:14:25 +01:00
|
|
|
name = "prboom-2.5.0";
|
|
|
|
src = fetchurl {
|
|
|
|
url = mirror://sourceforge/prboom/prboom-2.5.0.tar.gz;
|
|
|
|
sha256 = "1bjb04q8dk232956k30qlpq6q0hxb904yh1nflr87jcc1x3iqv12";
|
|
|
|
};
|
|
|
|
|
2018-07-23 22:27:03 +01:00
|
|
|
buildInputs = [ SDL SDL_mixer SDL_net ]
|
|
|
|
++ stdenv.lib.optional useOpenGL libGLU_combined;
|
2010-08-11 21:14:25 +01:00
|
|
|
|
2018-07-23 22:27:03 +01:00
|
|
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
(stdenv.lib.enableFeature useOpenGL "gl")
|
|
|
|
(stdenv.lib.enableFeature doCheck "sdltest")
|
|
|
|
] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
"--disable-cpu-opt"
|
|
|
|
"--without-x"
|
|
|
|
"ac_cv_type_uid_t=yes"
|
|
|
|
"ac_cv_type_gid_t=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
|
|
|
mv $out/games/ $out/bin
|
|
|
|
'';
|
2010-08-11 21:14:25 +01:00
|
|
|
}
|