summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/zandronum-bin/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-06-01 10:08:56 +0200
committermakefu <github@syntax-fehler.de>2017-06-01 10:08:56 +0200
commit772f84305d90380e0d221cf49ae3f1597d0d0510 (patch)
tree8d2241648396dc34fa96c8c68e12f832fbc7c308 /krebs/5pkgs/simple/zandronum-bin/default.nix
parent90822f64e0bf247c5cca2f035077553cac5ceb79 (diff)
parent21d92086fe00c7369fde3951f92e9f73f4c05ee9 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/5pkgs/simple/zandronum-bin/default.nix')
-rw-r--r--krebs/5pkgs/simple/zandronum-bin/default.nix83
1 files changed, 83 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/zandronum-bin/default.nix b/krebs/5pkgs/simple/zandronum-bin/default.nix
new file mode 100644
index 000000000..e97f46add
--- /dev/null
+++ b/krebs/5pkgs/simple/zandronum-bin/default.nix
@@ -0,0 +1,83 @@
+{ stdenv
+, atk
+, bzip2
+, cairo
+, fetchurl
+, fluidsynth
+, fontconfig
+, freetype
+, gdk_pixbuf
+, glib
+, gtk2
+, libjpeg_turbo
+, mesa_glu
+, mesa_noglu
+, openssl
+, pango
+, SDL
+, zlib
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+ name = "zandronum-3.0";
+
+ src = fetchurl {
+ url = "http://zandronum.com/downloads/testing/3.0/ZandroDev3.0-170205-2117linux-x86_64.tar.bz2";
+ sha256 = "17vrzk0m5b17sp3sqcg57r7812ma97lp3qxn9hmd39fwl1z40fz3";
+ };
+
+ libPath = stdenv.lib.makeLibraryPath [
+ atk
+ bzip2
+ cairo
+ fluidsynth
+ fontconfig
+ freetype
+ gdk_pixbuf
+ glib
+ gtk2
+ libjpeg_turbo
+ mesa_glu
+ mesa_noglu
+ openssl
+ pango
+ SDL
+ stdenv.cc.cc
+ zlib
+ ];
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ phases = [ "unpackPhase" "installPhase" ];
+
+ sourceRoot = ".";
+
+ installPhase = ''
+ mkdir -p $out/bin
+ mkdir -p $out/share/zandronum
+ cp *.so *.pk3 zandronum zandronum-server $out/share/zandronum
+
+ patchelf \
+ --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
+ --set-rpath $libPath:$out/share/zandronum \
+ $out/share/zandronum/zandronum
+ patchelf \
+ --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
+ --set-rpath $libPath \
+ $out/share/zandronum/zandronum-server
+
+ # If we don't set absolute argv0, zandronum.wad file is not found.
+ makeWrapper $out/share/zandronum/zandronum $out/bin/zandronum
+ makeWrapper $out/share/zandronum/zandronum-server $out/bin/zandronum-server
+ '';
+
+ meta = {
+ homepage = http://zandronum.com/;
+ description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software. Binary version for online play";
+ maintainers = [ stdenv.lib.maintainers.lassulus ];
+ # Binary version has different version string than source code version.
+ license = stdenv.lib.licenses.unfreeRedistributable;
+ platforms = [ "x86_64-linux" ];
+ };
+}