From 286e57b783b7c16e53ab4ee95d52794115025e50 Mon Sep 17 00:00:00 2001 From: Alexander Tsamutali Date: Wed, 27 Jan 2010 22:22:35 +0000 Subject: [PATCH] games/warsow: New package. svn path=/nixpkgs/trunk/; revision=19718 --- pkgs/games/warsow/default.nix | 55 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 ++++ 2 files changed, 61 insertions(+) create mode 100644 pkgs/games/warsow/default.nix diff --git a/pkgs/games/warsow/default.nix b/pkgs/games/warsow/default.nix new file mode 100644 index 000000000000..e3d17e855d5a --- /dev/null +++ b/pkgs/games/warsow/default.nix @@ -0,0 +1,55 @@ +{ stdenv, fetchurl, unzip, pkgconfig, zlib, curl, libjpeg, libvorbis +, libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal +}: +stdenv.mkDerivation rec { + name = "warsow-${version}"; + version = "0.5"; + src1 = fetchurl { + url = "http://static.warsow.net/release/warsow_${version}_sdk.zip"; + sha256 = "018z83irj6wr5mj4pnya1r4abmg9sqznnkyq0gw9sr9q9dxr7k1m"; + }; + src2 = fetchurl { + url = "http://static.warsow.net/release/warsow_${version}_unified.zip"; + sha256 = "002idzqjq41ygjny9kk31fjx7l9clxy4xm38hc5dky6yfx17ib36"; + }; + unpackPhase = '' + mkdir warsow_${version}_sdk + cd warsow_${version}_sdk + unzip $src1 + cd source + unzip $src2 'basewsw/*' -d release + ''; + inherit openal; + patchPhase = '' + substituteInPlace Makefile --replace "openal-config" "pkg-config openal" + substituteInPlace snd_openal/snd_main.c --replace libopenal.so.0 $openal/lib/libopenal.so + ''; + buildInputs = [ unzip pkgconfig zlib curl libjpeg libvorbis libXxf86dga + libXxf86vm libXinerama SDL mesa openal ]; + installPhase = '' + dest=$out/opt/warsow + cd release + for f in warsow wsw_server wswtv_server; do + substituteInPlace $f --replace BINARY_DIR= BINARY_DIR=$dest + done + ensureDir $dest + ensureDir $out/bin + cp -v {warsow,wsw_server,wswtv_server}.* $dest + cp -rv basewsw libs $dest + cp -v warsow wsw_server wswtv_server $out/bin + ''; + meta = { + description = "A multiplayer FPS designed for competitive gaming."; + longDescription = '' + Set in a futuristic cartoon-like world where rocketlauncher-wielding + pigs and lasergun-carrying cyberpunks roam the streets, Warsow is a + completely free fast-paced first-person shooter (FPS) for Windows, Linux + and Mac OS X. + ''; + homepage = http://www.warsow.net; + # Engine is under GPLv2, everything else is under + license = [ "unfree-redistributable" ]; + maintainers = with stdenv.lib.maintainers; [ astsmtl ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6f77d1d27eda..5619ad356c3b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8279,6 +8279,12 @@ let inherit fetchurl stdenv xlibs mesa; }; + warsow = import ../games/warsow { + inherit stdenv fetchurl unzip pkgconfig zlib curl libjpeg libvorbis SDL + mesa openal; + inherit (xlibs) libXxf86dga libXxf86vm libXinerama; + }; + xboard = builderDefsPackage (import ../games/xboard) { inherit (xlibs) libX11 xproto libXt libXaw libSM libICE libXmu libXext libXpm;