about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/teeworlds/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/games/teeworlds/default.nix
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-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/teeworlds/default.nix')
-rw-r--r--nixpkgs/pkgs/games/teeworlds/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/teeworlds/default.nix b/nixpkgs/pkgs/games/teeworlds/default.nix
new file mode 100644
index 000000000000..58b04821e129
--- /dev/null
+++ b/nixpkgs/pkgs/games/teeworlds/default.nix
@@ -0,0 +1,50 @@
+{ fetchurl, stdenv, cmake, pkgconfig, makeWrapper, python, alsaLib
+, libX11, libGLU, SDL, lua5, zlib, freetype, wavpack
+}:
+
+stdenv.mkDerivation rec {
+  name = "teeworlds-0.6.5";
+
+  src = fetchurl {
+    url = "https://downloads.teeworlds.com/teeworlds-0.6.5-src.tar.gz";
+    sha256 = "07llxjc47d1gd9jqj3vf08cmw26ha6189mwcix1khwa3frfbilqb";
+  };
+
+  postPatch = ''
+    # we always want to use system libs instead of these
+    rm -r other/{freetype,sdl}/{include,mac,windows}
+
+    # set compiled-in DATA_DIR so resources can be found
+    substituteInPlace src/engine/shared/storage.cpp \
+      --replace '#define DATA_DIR "data"' \
+                '#define DATA_DIR "${placeholder "out"}/share/teeworlds/data"'
+  '';
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+
+  buildInputs = [
+    python alsaLib libX11 libGLU SDL lua5 zlib freetype wavpack
+  ];
+
+  postInstall = ''
+    mkdir -p $out/share/doc/teeworlds
+    cp -v *.txt $out/share/doc/teeworlds/
+  '';
+
+  meta = {
+    description = "Retro multiplayer shooter game";
+
+    longDescription = ''
+      Teeworlds is a free online multiplayer game, available for all
+      major operating systems.  Battle with up to 12 players in a
+      variety of game modes, including Team Deathmatch and Capture The
+      Flag.  You can even design your own maps!
+    '';
+
+    homepage = https://teeworlds.com/;
+    license = "BSD-style, see `license.txt'";
+    maintainers = with stdenv.lib.maintainers; [ astsmtl ];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}