2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, makeWrapper
|
2019-06-02 21:37:50 +00:00
|
|
|
, openal, fluidsynth_1, soundfont-fluid, libGL, SDL2
|
2016-12-17 12:04:44 +00:00
|
|
|
, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
|
2015-05-10 17:50:56 +00:00
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gzdoom";
|
2019-11-20 21:36:31 +00:00
|
|
|
version = "4.2.4";
|
2016-12-17 12:04:44 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2015-05-10 17:50:56 +00:00
|
|
|
owner = "coelckers";
|
|
|
|
repo = "gzdoom";
|
2016-12-17 12:04:44 +00:00
|
|
|
rev = "g${version}";
|
2019-11-20 21:36:31 +00:00
|
|
|
sha256 = "1mkfpa3mx1rpd6lywdcqcf0y9ydzr1jxpk330kl9lxw59xihk0pc";
|
2015-05-10 17:50:56 +00:00
|
|
|
};
|
|
|
|
|
2017-01-30 08:38:13 +00:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper ];
|
2016-12-17 12:04:44 +00:00
|
|
|
buildInputs = [
|
2019-06-02 21:37:50 +00:00
|
|
|
SDL2 libGL openal fluidsynth_1 bzip2 zlib libjpeg libsndfile mpg123
|
2016-12-17 12:04:44 +00:00
|
|
|
game-music-emu
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-05-10 17:50:56 +00:00
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
|
2015-05-10 17:50:56 +00: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" \
|
2019-10-25 09:10:06 +00:00
|
|
|
libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp
|
2015-05-10 17:50:56 +00: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
|
2017-01-30 08:38:13 +00:00
|
|
|
makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
|
2015-05-10 17:50:56 +00:00
|
|
|
'';
|
|
|
|
|
2016-12-17 12:04:44 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/coelckers/gzdoom;
|
2015-05-10 17:50:56 +00:00
|
|
|
description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
|
2017-05-22 11:34:11 +00:00
|
|
|
license = licenses.gpl3;
|
2019-01-04 07:32:39 +00:00
|
|
|
platforms = ["x86_64-linux"];
|
2016-12-17 12:04:44 +00:00
|
|
|
maintainers = with maintainers; [ lassulus ];
|
2015-05-10 17:50:56 +00:00
|
|
|
};
|
|
|
|
}
|