GZDoom 4.3.3 -> 4.4.2
* Update to 4.4.2 4.4.0 increased the ZScript version number, GZDoom 4.4.1 and 4.4.2 have some bugfixes. * Fix bad checksum Old hash was done without `--unpack` option, resulting in a mismatch. * Fetch submodules This fixes the issue with `zmusic` not being brought in as a dependency. * Add zmusic derivation Since zmusic isn't actually a submodule, we have to derive it ourselves and pass it as a buildInput. * Semicolon. * Semicolon in the *right* place this time. * Merge the zmusic source into the gzdoom source. Apparently this is how they expect zmusic to be added. Why this isn't a submodule, I don't know. * Fix bad path editing Credit to Open Skies for fixing this. Turns out the paths edited in the `gzdoom` derivation were for zmusic, which needs these edits to be made so that it looks in nix-friendly places for its stuff.
This commit is contained in:
parent
d7cb69aaeb
commit
951e2175c3
|
@ -1,55 +1,85 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, makeWrapper
|
||||
, openal, fluidsynth_1, soundfont-fluid, libGL, SDL2
|
||||
, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
|
||||
{ stdenv, fetchFromGitHub, cmake, makeWrapper, openal, fluidsynth_1
|
||||
, soundfont-fluid, libGL, SDL2, bzip2, zlib, libjpeg, libsndfile, mpg123
|
||||
, game-music-emu, pkgconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gzdoom";
|
||||
version = "4.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
let
|
||||
zmusic-src = fetchFromGitHub {
|
||||
owner = "coelckers";
|
||||
repo = "gzdoom";
|
||||
rev = "g${version}";
|
||||
sha256 = "1c4vhnvvwy1rs8xm01kqd486h5xsiccwkf95fjx7912zr49yalks";
|
||||
repo = "zmusic";
|
||||
rev = "2d0ea861174f9e2031400ab29f5bcc8425521cc6";
|
||||
sha256 = "1ac7lhbzwfr0fsyv7n70hvb8imzngxn1qyanmv9j26j0h90hhl8a";
|
||||
};
|
||||
zmusic = stdenv.mkDerivation {
|
||||
pname = "zmusic";
|
||||
version = "1.1.0";
|
||||
|
||||
src = zmusic-src;
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i \
|
||||
-e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
|
||||
-e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
|
||||
source/mididevices/music_fluidsynth_mididevice.cpp
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [
|
||||
SDL2 libGL openal fluidsynth_1 bzip2 zlib libjpeg libsndfile mpg123
|
||||
game-music-emu
|
||||
];
|
||||
gzdoom = stdenv.mkDerivation rec {
|
||||
pname = "gzdoom";
|
||||
version = "4.4.2";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
src = fetchFromGitHub {
|
||||
owner = "coelckers";
|
||||
repo = "gzdoom";
|
||||
rev = "g${version}";
|
||||
sha256 = "1xkkmbsdv64wyb9r2fv5mwyqw0bjryk528jghdrh47pndmjs9a38";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
NIX_CFLAGS_LINK = "-lopenal -lfluidsynth";
|
||||
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
|
||||
buildInputs = [
|
||||
SDL2
|
||||
libGL
|
||||
openal
|
||||
fluidsynth_1
|
||||
bzip2
|
||||
zlib
|
||||
libjpeg
|
||||
libsndfile
|
||||
mpg123
|
||||
game-music-emu
|
||||
zmusic
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i \
|
||||
-e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
|
||||
-e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
|
||||
libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp
|
||||
'';
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
|
||||
for i in *.pk3; do
|
||||
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
||||
done
|
||||
for i in fm_banks/*; do
|
||||
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
||||
done
|
||||
for i in soundfonts/*; do
|
||||
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
||||
done
|
||||
mkdir $out/bin
|
||||
makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
|
||||
'';
|
||||
NIX_CFLAGS_LINK = "-lopenal -lfluidsynth";
|
||||
|
||||
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 = ["x86_64-linux"];
|
||||
maintainers = with maintainers; [ lassulus ];
|
||||
installPhase = ''
|
||||
install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
|
||||
for i in *.pk3; do
|
||||
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
||||
done
|
||||
for i in fm_banks/*; do
|
||||
install -Dm644 "$i" "$out/lib/gzdoom/$i"
|
||||
done
|
||||
for i in soundfonts/*; 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 = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ lassulus ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
in gzdoom
|
||||
|
|
Loading…
Reference in New Issue