zdoom: 2.7.1 -> 2.8.1
This commit is contained in:
parent
60903f7320
commit
1cc9d9ef2c
@ -1,40 +1,57 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, fmod, mesa, SDL }:
|
{ stdenv, fetchurl, p7zip, cmake
|
||||||
|
, SDL2, openal, fluidsynth, soundfont-fluid, bzip2, zlib, libjpeg, game-music-emu
|
||||||
|
, libsndfile, mpg123 }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "zdoom-2.7.1";
|
name = "zdoom-${version}";
|
||||||
src = fetchFromGitHub {
|
majorVersion = "2.8";
|
||||||
#url = "https://github.com/rheit/zdoom";
|
version = "${majorVersion}.1";
|
||||||
owner = "rheit";
|
|
||||||
repo = "zdoom";
|
src = fetchurl {
|
||||||
rev = "2.7.1";
|
url = "https://zdoom.org/files/zdoom/${majorVersion}/zdoom-${version}-src.7z";
|
||||||
sha256 = "00bx4sgl9j1dyih7yysfq4ah6msxw8580g53p99jfym34ky5ppkh";
|
sha256 = "0453fqrh9l00xwphfxni5qkf9y134n3s1mr1dvi5cbkxcva7j8bq";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ cmake fmod mesa SDL ];
|
nativeBuildInputs = [ p7zip cmake ];
|
||||||
|
buildInputs = [
|
||||||
cmakeFlags = [
|
SDL2 openal fluidsynth bzip2 zlib libjpeg game-music-emu libsndfile mpg123
|
||||||
"-DFMOD_LIBRARY=${fmod}/lib/libfmodex.so"
|
|
||||||
"-DSDL_INCLUDE_DIR=${SDL.dev}/include"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-I ${SDL.dev}/include/SDL" ];
|
cmakeFlags = [
|
||||||
|
"-DFORCE_INTERNAL_GME=OFF"
|
||||||
preConfigure = ''
|
"-DGME_INCLUDE_DIR=${game-music-emu}/include"
|
||||||
sed s@zdoom.pk3@$out/share/zdoom.pk3@ -i src/version.h
|
"-DGME_LIBRARIES=${game-music-emu}/lib/libgme.so"
|
||||||
'';
|
];
|
||||||
|
|
||||||
installPhase = ''
|
sourceRoot = ".";
|
||||||
mkdir -p $out/bin
|
|
||||||
cp zdoom $out/bin
|
enableParallelBuilding = true;
|
||||||
mkdir -p $out/share
|
|
||||||
cp zdoom.pk3 $out/share
|
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/music_fluidsynth_mididevice.cpp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
installPhase = ''
|
||||||
homepage = http://zdoom.org/;
|
install -Dm755 zdoom "$out/lib/zdoom/zdoom"
|
||||||
|
for i in *.pk3; do
|
||||||
|
install -Dm644 "$i" "$out/lib/zdoom/$i"
|
||||||
|
done
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s $out/lib/zdoom/zdoom $out/bin/zdoom
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "http://zdoom.org/";
|
||||||
description = "Enhanced port of the official DOOM source code";
|
description = "Enhanced port of the official DOOM source code";
|
||||||
license = stdenv.lib.licenses.unfree;
|
# Doom source license, MAME license
|
||||||
maintainers = [ stdenv.lib.maintainers.lassulus ];
|
license = licenses.unfreeRedistributable;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainer;s [ lassulus ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user