diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/games/warsow/engine.nix | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/games/warsow/engine.nix')
-rw-r--r-- | nixpkgs/pkgs/games/warsow/engine.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/warsow/engine.nix b/nixpkgs/pkgs/games/warsow/engine.nix new file mode 100644 index 000000000000..12832f2a4391 --- /dev/null +++ b/nixpkgs/pkgs/games/warsow/engine.nix @@ -0,0 +1,52 @@ +{ stdenv, lib, fetchurl, cmake, libogg, libvorbis, libtheora, curl, freetype +, libjpeg, libpng, SDL2, libGL, openal, zlib +}: + +let + # The game loads all those via dlopen(). + libs = lib.mapAttrs (name: x: lib.getLib x) { + inherit zlib curl libpng libjpeg libogg libvorbis libtheora freetype; + }; + +in stdenv.mkDerivation (libs // rec { + name = "warsow-engine-${version}"; + version = "2.1.0"; + + src = fetchurl { + url = "http://sebastian.network/warsow/warsow_21_sdk.tar.gz"; + sha256 = "0fj5k7qpf6far8i1xhqxlpfjch10zj26xpilhp95aq2yiz08pj4r"; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + libogg libvorbis libtheora curl freetype libjpeg SDL2 libGL openal zlib + libpng + ]; + + patches = [ ./libpath.patch ]; + postPatch = '' + cd source/source + substituteAllInPlace gameshared/q_arch.h + ''; + + cmakeFlags = [ "-DQFUSION_GAME=Warsow" ]; + + enableParallelBuilding = true; + + installPhase = '' + mkdir -p $out/lib + cp -r libs $out/lib/warsow + for i in warsow.* wsw_server.* wswtv_server.*; do + install -Dm755 "$i" "$out/bin/''${i%.*}" + done + ''; + + meta = with stdenv.lib; { + description = "Multiplayer FPS game designed for competitive gaming (engine only)"; + homepage = http://www.warsow.net; + license = licenses.gpl2; + maintainers = with maintainers; [ astsmtl abbradar ]; + platforms = platforms.linux; + }; +}) |