games/warsow: New package.

svn path=/nixpkgs/trunk/; revision=19718

+61
+55
pkgs/games/warsow/default.nix
···
··· 1 + { stdenv, fetchurl, unzip, pkgconfig, zlib, curl, libjpeg, libvorbis 2 + , libXxf86dga, libXxf86vm, libXinerama, SDL, mesa, openal 3 + }: 4 + stdenv.mkDerivation rec { 5 + name = "warsow-${version}"; 6 + version = "0.5"; 7 + src1 = fetchurl { 8 + url = "http://static.warsow.net/release/warsow_${version}_sdk.zip"; 9 + sha256 = "018z83irj6wr5mj4pnya1r4abmg9sqznnkyq0gw9sr9q9dxr7k1m"; 10 + }; 11 + src2 = fetchurl { 12 + url = "http://static.warsow.net/release/warsow_${version}_unified.zip"; 13 + sha256 = "002idzqjq41ygjny9kk31fjx7l9clxy4xm38hc5dky6yfx17ib36"; 14 + }; 15 + unpackPhase = '' 16 + mkdir warsow_${version}_sdk 17 + cd warsow_${version}_sdk 18 + unzip $src1 19 + cd source 20 + unzip $src2 'basewsw/*' -d release 21 + ''; 22 + inherit openal; 23 + patchPhase = '' 24 + substituteInPlace Makefile --replace "openal-config" "pkg-config openal" 25 + substituteInPlace snd_openal/snd_main.c --replace libopenal.so.0 $openal/lib/libopenal.so 26 + ''; 27 + buildInputs = [ unzip pkgconfig zlib curl libjpeg libvorbis libXxf86dga 28 + libXxf86vm libXinerama SDL mesa openal ]; 29 + installPhase = '' 30 + dest=$out/opt/warsow 31 + cd release 32 + for f in warsow wsw_server wswtv_server; do 33 + substituteInPlace $f --replace BINARY_DIR= BINARY_DIR=$dest 34 + done 35 + ensureDir $dest 36 + ensureDir $out/bin 37 + cp -v {warsow,wsw_server,wswtv_server}.* $dest 38 + cp -rv basewsw libs $dest 39 + cp -v warsow wsw_server wswtv_server $out/bin 40 + ''; 41 + meta = { 42 + description = "A multiplayer FPS designed for competitive gaming."; 43 + longDescription = '' 44 + Set in a futuristic cartoon-like world where rocketlauncher-wielding 45 + pigs and lasergun-carrying cyberpunks roam the streets, Warsow is a 46 + completely free fast-paced first-person shooter (FPS) for Windows, Linux 47 + and Mac OS X. 48 + ''; 49 + homepage = http://www.warsow.net; 50 + # Engine is under GPLv2, everything else is under 51 + license = [ "unfree-redistributable" ]; 52 + maintainers = with stdenv.lib.maintainers; [ astsmtl ]; 53 + platforms = with stdenv.lib.platforms; linux; 54 + }; 55 + }
+6
pkgs/top-level/all-packages.nix
··· 8279 inherit fetchurl stdenv xlibs mesa; 8280 }; 8281 8282 xboard = builderDefsPackage (import ../games/xboard) { 8283 inherit (xlibs) libX11 xproto libXt libXaw libSM 8284 libICE libXmu libXext libXpm;
··· 8279 inherit fetchurl stdenv xlibs mesa; 8280 }; 8281 8282 + warsow = import ../games/warsow { 8283 + inherit stdenv fetchurl unzip pkgconfig zlib curl libjpeg libvorbis SDL 8284 + mesa openal; 8285 + inherit (xlibs) libXxf86dga libXxf86vm libXinerama; 8286 + }; 8287 + 8288 xboard = builderDefsPackage (import ../games/xboard) { 8289 inherit (xlibs) libX11 xproto libXt libXaw libSM 8290 libICE libXmu libXext libXpm;