1 { lib, stdenv, fetchurl, p7zip, cmake
2 , SDL2, openal, fluidsynth, soundfont-fluid, bzip2, zlib, libjpeg, game-music-emu
3 , libsndfile, mpg123 }:
5 stdenv.mkDerivation rec {
8 version = "${majorVersion}.1";
11 url = "https://zdoom.org/files/zdoom/${majorVersion}/zdoom-${version}-src.7z";
12 sha256 = "0453fqrh9l00xwphfxni5qkf9y134n3s1mr1dvi5cbkxcva7j8bq";
15 nativeBuildInputs = [ p7zip cmake ];
17 SDL2 openal fluidsynth bzip2 zlib libjpeg game-music-emu libsndfile mpg123
21 "-DFORCE_INTERNAL_GME=OFF"
22 "-DGME_INCLUDE_DIR=${game-music-emu}/include"
23 "-DGME_LIBRARIES=${game-music-emu}/lib/libgme.so"
28 NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
32 -e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
33 -e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
34 src/sound/music_fluidsynth_mididevice.cpp
38 install -Dm755 zdoom "$out/lib/zdoom/zdoom"
40 install -Dm644 "$i" "$out/lib/zdoom/$i"
43 ln -s $out/lib/zdoom/zdoom $out/bin/zdoom
47 homepage = "http://zdoom.org/";
48 description = "Enhanced port of the official DOOM source code";
49 # Doom source license, MAME license
50 license = licenses.unfreeRedistributable;
51 platforms = platforms.linux;
52 maintainers = with maintainers; [ lassulus ];