2015-06-12 13:29:47 +02:00
|
|
|
{ stdenv
|
|
|
|
, atk
|
|
|
|
, bzip2
|
|
|
|
, cairo
|
|
|
|
, fetchurl
|
2015-06-29 17:14:15 +02:00
|
|
|
, fluidsynth
|
2015-06-12 13:29:47 +02:00
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
, gdk_pixbuf
|
|
|
|
, glib
|
|
|
|
, gtk
|
|
|
|
, libjpeg_turbo
|
|
|
|
, mesa_glu
|
|
|
|
, mesa_noglu
|
|
|
|
, openssl
|
|
|
|
, pango
|
|
|
|
, SDL
|
|
|
|
, zlib
|
2016-02-04 17:24:27 +01:00
|
|
|
, makeWrapper
|
2015-06-12 13:29:47 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-08-18 02:56:14 +02:00
|
|
|
name = "zandronum-2.1.2";
|
2015-12-12 18:29:39 +01:00
|
|
|
|
2015-06-12 13:29:47 +02:00
|
|
|
src = fetchurl {
|
2015-08-18 02:56:14 +02:00
|
|
|
url = "http://zandronum.com/downloads/zandronum2.1.2-linux-x86_64.tar.bz2";
|
|
|
|
sha256 = "1f5aw2m8c0bl3lrvi2k3rrzq3q9x1ikxnxxjgh3k9qvanfn7ykbk";
|
2015-06-12 13:29:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
libPath = stdenv.lib.makeLibraryPath [
|
|
|
|
atk
|
|
|
|
bzip2
|
|
|
|
cairo
|
2015-06-29 17:14:15 +02:00
|
|
|
fluidsynth
|
2015-06-12 13:29:47 +02:00
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
gdk_pixbuf
|
|
|
|
glib
|
|
|
|
gtk
|
|
|
|
libjpeg_turbo
|
|
|
|
mesa_glu
|
|
|
|
mesa_noglu
|
|
|
|
openssl
|
|
|
|
pango
|
|
|
|
SDL
|
|
|
|
stdenv.cc.cc
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
2016-02-04 17:24:27 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2015-06-12 13:29:47 +02:00
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
|
2015-12-12 18:29:39 +01:00
|
|
|
sourceRoot = ".";
|
2015-06-12 13:29:47 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2015-12-12 18:29:39 +01:00
|
|
|
mkdir -p $out/share/zandronum
|
|
|
|
cp *.so *.pk3 zandronum zandronum-server $out/share/zandronum
|
2015-06-12 13:29:47 +02:00
|
|
|
|
2015-12-12 18:29:39 +01:00
|
|
|
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
|
2015-06-12 13:29:47 +02:00
|
|
|
|
2016-02-04 17:24:27 +01:00
|
|
|
# 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
|
2015-06-12 13:29:47 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://zandronum.com/;
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software. Binary version for online play";
|
2016-02-10 14:59:36 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.lassulus ];
|
2016-02-04 17:24:27 +01:00
|
|
|
# Binary version has different version string than source code version.
|
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
2015-12-12 18:29:39 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2015-06-12 13:29:47 +02:00
|
|
|
};
|
|
|
|
}
|