about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/wargus/stratagus.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/wargus/stratagus.nix')
-rw-r--r--nixpkgs/pkgs/games/wargus/stratagus.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/wargus/stratagus.nix b/nixpkgs/pkgs/games/wargus/stratagus.nix
new file mode 100644
index 000000000000..fc4f23427994
--- /dev/null
+++ b/nixpkgs/pkgs/games/wargus/stratagus.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config, makeWrapper
+, zlib, bzip2, libpng, lua5_1, toluapp
+, SDL2, SDL2_mixer, SDL2_image, libGL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "stratagus";
+  version = "3.3.1";
+
+  src = fetchFromGitHub {
+    owner = "wargus";
+    repo = "stratagus";
+    rev = "v${version}";
+    sha256 = "sha256-q8AvIWr/bOzI0wV0D2emxIXYEKDYmFxbtwr2BS+xYfA=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    zlib bzip2 libpng
+    lua5_1 toluapp
+    (lib.getDev SDL2) SDL2_image SDL2_mixer libGL
+  ];
+  cmakeFlags = [
+    "-DCMAKE_CXX_FLAGS=-Wno-error=format-overflow"
+  ];
+
+  meta = with lib; {
+    description = "strategy game engine";
+    homepage = "https://wargus.github.io/stratagus.html";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.astro ];
+    platforms = platforms.linux;
+  };
+}