nixpkgs-suyu/pkgs/games/gzdoom/default.nix
Ryan Mulligan b5b908483e gzdoom: 3.1.0 -> 3.2.5
Semi-automatic update. These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 3.2.5 with grep in /nix/store/m0ms0fpwwi306zq5as89r1kb40bhba8n-gzdoom-3.2.5
- found 3.2.5 in filename of file in /nix/store/m0ms0fpwwi306zq5as89r1kb40bhba8n-gzdoom-3.2.5
2018-03-08 17:59:58 -08:00

50 lines
1.4 KiB
Nix

{ stdenv, fetchFromGitHub, cmake, zdoom, makeWrapper
, openal, fluidsynth, soundfont-fluid, libGL, SDL2
, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
stdenv.mkDerivation rec {
name = "gzdoom-${version}";
version = "3.2.5";
src = fetchFromGitHub {
owner = "coelckers";
repo = "gzdoom";
rev = "g${version}";
sha256 = "1x4v3cv448wqx4cdhs28nxrv0lm2c2pd9i2hm92q9lg5yw8vv19q";
};
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [
SDL2 libGL openal fluidsynth bzip2 zlib libjpeg libsndfile mpg123
game-music-emu
];
enableParallelBuilding = true;
NIX_CFLAGS_LINK = [ "-lopenal" "-lfluidsynth" ];
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/mididevices/music_fluidsynth_mididevice.cpp
'';
installPhase = ''
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
for i in *.pk3; do
install -Dm644 "$i" "$out/lib/gzdoom/$i"
done
mkdir $out/bin
makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
'';
meta = with stdenv.lib; {
homepage = https://github.com/coelckers/gzdoom;
description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ lassulus ];
};
}