add pkgs: zandronum, zandronum-{server,bin}, closes #8338
This commit is contained in:
parent
24dc9d7160
commit
099923c7be
82
pkgs/games/zandronum/bin.nix
Normal file
82
pkgs/games/zandronum/bin.nix
Normal file
@ -0,0 +1,82 @@
|
||||
{ stdenv
|
||||
, atk
|
||||
, bzip2
|
||||
, cairo
|
||||
, fetchurl
|
||||
, fontconfig
|
||||
, freetype
|
||||
, gdk_pixbuf
|
||||
, glib
|
||||
, gtk
|
||||
, libjpeg_turbo
|
||||
, mesa_glu
|
||||
, mesa_noglu
|
||||
, openssl
|
||||
, pango
|
||||
, SDL
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "zandronum-2.0";
|
||||
src = fetchurl {
|
||||
url = "http://zandronum.com/downloads/zandronum2.0-linux-x86_64.tar.bz2";
|
||||
sha256 = "1k49az7x0ig40r2xisscpyhfcx9zzivx8w1l1ispj58g6qivicgc";
|
||||
};
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath [
|
||||
atk
|
||||
bzip2
|
||||
cairo
|
||||
fontconfig
|
||||
freetype
|
||||
gdk_pixbuf
|
||||
glib
|
||||
gtk
|
||||
libjpeg_turbo
|
||||
mesa_glu
|
||||
mesa_noglu
|
||||
openssl
|
||||
pango
|
||||
SDL
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xf $src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share
|
||||
cp * $out/share
|
||||
|
||||
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/share/zandronum
|
||||
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/share/zandronum-server
|
||||
|
||||
cat > $out/bin/zandronum << EOF
|
||||
#!/bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=$libPath:$out/share $out/share/zandronum "\$@"
|
||||
EOF
|
||||
|
||||
cat > $out/bin/zandronum-server << EOF
|
||||
#!/bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=$libPath:$out/share $out/share/zandronum-server "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$out/bin/zandronum"
|
||||
chmod +x "$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.";
|
||||
maintainer = [ stdenv.lib.maintainers.lassulus ];
|
||||
};
|
||||
}
|
||||
|
43
pkgs/games/zandronum/default.nix
Normal file
43
pkgs/games/zandronum/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{ stdenv, fetchhg, cmake, SDL, mesa, fmod42416, openssl, sqlite, sqlite-amalgamation }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zandronum-2.0";
|
||||
src = fetchhg {
|
||||
url = "https://bitbucket.org/Torr_Samaho/zandronum";
|
||||
rev = "2fc02c0";
|
||||
sha256 = "1syzy0iphm6jj5wag3xyr2fx7vyg2cjcmijhvgw2rc67rww85pv2";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "configurePhase" "buildPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ cmake SDL mesa fmod42416 openssl sqlite sqlite-amalgamation ];
|
||||
|
||||
preConfigure = ''
|
||||
cp ${sqlite-amalgamation}/* sqlite/
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DFMOD_LIBRARY=${fmod42416}/lib/libfmodex.so"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share
|
||||
cp zandronum zandronum.pk3 skulltag_actors.pk3 liboutput_sdl.so $out/share
|
||||
|
||||
cat > $out/bin/zandronum << EOF
|
||||
#!/bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=$out/share $out/share/zandronum "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$out/bin/zandronum"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://zandronum.com/;
|
||||
description = "Multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software.";
|
||||
maintainer = [ stdenv.lib.maintainers.lassulus ];
|
||||
};
|
||||
}
|
||||
|
44
pkgs/games/zandronum/server.nix
Normal file
44
pkgs/games/zandronum/server.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, fetchhg, cmake, openssl, sqlite, sqlite-amalgamation, SDL }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "zandronum-server-2.0";
|
||||
src = fetchhg {
|
||||
url = "https://bitbucket.org/Torr_Samaho/zandronum";
|
||||
rev = "2fc02c0";
|
||||
sha256 = "1syzy0iphm6jj5wag3xyr2fx7vyg2cjcmijhvgw2rc67rww85pv2";
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "configurePhase" "buildPhase" "installPhase" ];
|
||||
|
||||
buildInputs = [ cmake openssl sqlite sqlite-amalgamation SDL ];
|
||||
|
||||
preConfigure = ''
|
||||
cp ${sqlite-amalgamation}/* sqlite/
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSERVERONLY=ON"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
find
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share
|
||||
cp zandronum-server zandronum.pk3 skulltag_actors.pk3 $out/share
|
||||
|
||||
cat > $out/bin/zandronum-server << EOF
|
||||
#!/bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=$out/share $out/share/zandronum-server "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x "$out/bin/zandronum-server"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://zandronum.com/;
|
||||
description = "Server of the multiplayer oriented port, based off Skulltag, for Doom and Doom II by id Software";
|
||||
maintainer = [ stdenv.lib.maintainers.lassulus ];
|
||||
};
|
||||
}
|
||||
|
@ -13580,6 +13580,10 @@ let
|
||||
inherit (xlibs) libX11 xproto libXpm libXt;
|
||||
};
|
||||
|
||||
zandronum = callPackage ../games/zandronum { };
|
||||
zandronum-server = callPackage ../games/zandronum/server.nix { };
|
||||
zandronum-bin = callPackage ../games/zandronum/bin.nix { };
|
||||
|
||||
zdoom = callPackage ../games/zdoom { };
|
||||
|
||||
zod = callPackage ../games/zod { };
|
||||
|
Loading…
Reference in New Issue
Block a user