git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit951e2175c3070e98b154b211de53ca4c570295b3 authorDerpford <10187719+Derpford@users.noreply.github.com> dateThu 16 Jul 2020, 16:45 (6 years ago) parentd7cb69a
1 file changed+80−50
pkgs/games/gzdoom/default.nix+80−50
pkgs/games/gzdoom/default.nix+80−50
@@ -1,55 +1,85 @@
1−{ stdenv, fetchFromGitHub, cmake, makeWrapper
2−, openal, fluidsynth_1, soundfont-fluid, libGL, SDL2
3−, bzip2, zlib, libjpeg, libsndfile, mpg123, game-music-emu }:
1+{ stdenv, fetchFromGitHub, cmake, makeWrapper, openal, fluidsynth_1
2+, soundfont-fluid, libGL, SDL2, bzip2, zlib, libjpeg, libsndfile, mpg123
3+, game-music-emu, pkgconfig }:
44
5−stdenv.mkDerivation rec {
6− pname = "gzdoom";
7− version = "4.3.3";
8−
9− src = fetchFromGitHub {
5+let
6+ zmusic-src = fetchFromGitHub {
107 owner = "coelckers";
11− repo = "gzdoom";
12− rev = "g${version}";
13− sha256 = "1c4vhnvvwy1rs8xm01kqd486h5xsiccwkf95fjx7912zr49yalks";
8+ repo = "zmusic";
9+ rev = "2d0ea861174f9e2031400ab29f5bcc8425521cc6";
10+ sha256 = "1ac7lhbzwfr0fsyv7n70hvb8imzngxn1qyanmv9j26j0h90hhl8a";
1411 };
12+ zmusic = stdenv.mkDerivation {
13+ pname = "zmusic";
14+ version = "1.1.0";
15+
16+ src = zmusic-src;
17+
18+ nativeBuildInputs = [ cmake pkgconfig ];
19+
20+ preConfigure = ''
21+ sed -i \
22+ -e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
23+ -e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
24+ source/mididevices/music_fluidsynth_mididevice.cpp
25+ '';
1526
16− nativeBuildInputs = [ cmake makeWrapper ];
17− buildInputs = [
18− SDL2 libGL openal fluidsynth_1 bzip2 zlib libjpeg libsndfile mpg123
19− game-music-emu
20− ];
21−
22− enableParallelBuilding = true;
23−
24− NIX_CFLAGS_LINK = "-lopenal -lfluidsynth";
25−
26− preConfigure = ''
27− sed -i \
28− -e "s@/usr/share/sounds/sf2/@${soundfont-fluid}/share/soundfonts/@g" \
29− -e "s@FluidR3_GM.sf2@FluidR3_GM2-2.sf2@g" \
30− libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp
31− '';
32−
33− installPhase = ''
34− install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
35− for i in *.pk3; do
36− install -Dm644 "$i" "$out/lib/gzdoom/$i"
37− done
38− for i in fm_banks/*; do
39− install -Dm644 "$i" "$out/lib/gzdoom/$i"
40− done
41− for i in soundfonts/*; do
42− install -Dm644 "$i" "$out/lib/gzdoom/$i"
43− done
44− mkdir $out/bin
45− makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
46− '';
47−
48− meta = with stdenv.lib; {
49− homepage = "https://github.com/coelckers/gzdoom";
50− description = "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
51− license = licenses.gpl3;
52− platforms = ["x86_64-linux"];
53− maintainers = with maintainers; [ lassulus ];
5427 };
55−}
28+
29+ gzdoom = stdenv.mkDerivation rec {
30+ pname = "gzdoom";
31+ version = "4.4.2";
32+
33+ src = fetchFromGitHub {
34+ owner = "coelckers";
35+ repo = "gzdoom";
36+ rev = "g${version}";
37+ sha256 = "1xkkmbsdv64wyb9r2fv5mwyqw0bjryk528jghdrh47pndmjs9a38";
38+ fetchSubmodules = true;
39+ };
40+
41+ nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
42+ buildInputs = [
43+ SDL2
44+ libGL
45+ openal
46+ fluidsynth_1
47+ bzip2
48+ zlib
49+ libjpeg
50+ libsndfile
51+ mpg123
52+ game-music-emu
53+ zmusic
54+ ];
55+
56+ enableParallelBuilding = true;
57+
58+ NIX_CFLAGS_LINK = "-lopenal -lfluidsynth";
59+
60+ installPhase = ''
61+ install -Dm755 gzdoom "$out/lib/gzdoom/gzdoom"
62+ for i in *.pk3; do
63+ install -Dm644 "$i" "$out/lib/gzdoom/$i"
64+ done
65+ for i in fm_banks/*; do
66+ install -Dm644 "$i" "$out/lib/gzdoom/$i"
67+ done
68+ for i in soundfonts/*; do
69+ install -Dm644 "$i" "$out/lib/gzdoom/$i"
70+ done
71+ mkdir $out/bin
72+ makeWrapper $out/lib/gzdoom/gzdoom $out/bin/gzdoom
73+ '';
74+
75+ meta = with stdenv.lib; {
76+ homepage = "https://github.com/coelckers/gzdoom";
77+ description =
78+ "A Doom source port based on ZDoom. It features an OpenGL renderer and lots of new features";
79+ license = licenses.gpl3;
80+ platforms = [ "x86_64-linux" ];
81+ maintainers = with maintainers; [ lassulus ];
82+ };
83+ };
84+
85+in gzdoom