2016-12-17 12:04:44 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, zdoom
|
|
|
|
, openal, fluidsynth, soundfont-fluid, mesa_noglu, SDL2
|
|
|
|
, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
|
2015-05-10 18:50:56 +01:00
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gzdoom-${version}";
|
|
|
|
version = "2.2.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2015-05-10 18:50:56 +01:00
|
|
|
owner = "coelckers";
|
|
|
|
repo = "gzdoom";
|
2016-12-17 12:04:44 +00:00
|
|
|
rev = "g${version}";
|
|
|
|
sha256 = "0xxgd8fa29pcdir1xah5cvx41bfy76p4dydpp13mf44p9pr29hrb";
|
2015-05-10 18:50:56 +01:00
|
|
|
};
|
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [
|
|
|
|
SDL2 mesa_noglu openal fluidsynth bzip2 zlib libjpeg libsndfile mpg123
|
|
|
|
game-music-emu
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-05-10 18:50:56 +01:00
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
|
2015-05-10 18:50:56 +01:00
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i \
|
|
|
|
-e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
|
|
|
|
-e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
|
|
|
|
src/sound/music_fluidsynth_mididevice.cpp
|
2015-05-10 18:50:56 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-12-17 12:04:44 +00:00
|
|
|
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
|
|
|
|
for i in *.pk3; do
|
|
|
|
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
|
|
|
done
|
|
|
|
mkdir $out/bin
|
|
|
|
ln -s $out/lib/gzdoom/gzdoom $out/bin/gzdoom
|
2015-05-10 18:50:56 +01:00
|
|
|
'';
|
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/coelckers/gzdoom";
|
2015-05-10 18:50:56 +01:00
|
|
|
description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
|
2016-12-17 12:04:44 +00:00
|
|
|
# Doom source license, MAME license
|
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ lassulus ];
|
2015-05-10 18:50:56 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|