2017-01-30 09:38:13 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, zdoom, makeWrapper
|
2016-12-17 13:04:44 +01:00
|
|
|
, openal, fluidsynth, soundfont-fluid, mesa_noglu, SDL2
|
|
|
|
, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
|
2015-05-10 19:50:56 +02:00
|
|
|
|
2016-12-17 13:04:44 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gzdoom-${version}";
|
2017-06-02 17:02:34 +02:00
|
|
|
version = "3.1.0";
|
2016-12-17 13:04:44 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2015-05-10 19:50:56 +02:00
|
|
|
owner = "coelckers";
|
|
|
|
repo = "gzdoom";
|
2016-12-17 13:04:44 +01:00
|
|
|
rev = "g${version}";
|
2017-06-02 17:02:34 +02:00
|
|
|
sha256 = "02287xvlk4a07ssm9y9h5vfsvdssshz13n5bbz13pfcani5d9flv";
|
2015-05-10 19:50:56 +02:00
|
|
|
};
|
|
|
|
|
2017-01-30 09:38:13 +01:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
2016-12-17 13:04:44 +01:00
|
|
|
buildInputs = [
|
|
|
|
SDL2 mesa_noglu openal fluidsynth bzip2 zlib libjpeg libsndfile mpg123
|
|
|
|
game-music-emu
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-05-10 19:50:56 +02:00
|
|
|
|
2016-12-17 13:04:44 +01:00
|
|
|
NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
|
2015-05-10 19:50:56 +02:00
|
|
|
|
2016-12-17 13:04:44 +01: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" \
|
2017-05-22 13:34:11 +02:00
|
|
|
src/sound/mididevices/music_fluidsynth_mididevice.cpp
|
2015-05-10 19:50:56 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-12-17 13:04:44 +01:00
|
|
|
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
|
|
|
|
for i in *.pk3; do
|
|
|
|
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
|
|
|
done
|
|
|
|
mkdir $out/bin
|
2017-01-30 09:38:13 +01:00
|
|
|
makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
|
2015-05-10 19:50:56 +02:00
|
|
|
'';
|
|
|
|
|
2016-12-17 13:04:44 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/coelckers/gzdoom";
|
2015-05-10 19:50:56 +02:00
|
|
|
description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
|
2017-05-22 13:34:11 +02:00
|
|
|
license = licenses.gpl3;
|
2016-12-17 13:04:44 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ lassulus ];
|
2015-05-10 19:50:56 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|