about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAstro <astro@spaceboyz.net>2020-09-24 19:24:09 +0200
committerAstro <astro@spaceboyz.net>2021-02-22 00:44:52 +0100
commit50847e0b174a879ca09dbf31bb8cc4729b82327c (patch)
tree39572e0afd87c94e58595b51942708e73de35559 /pkgs
parentfb6f9b7eb0aa8629776ea32d2be6eaf660a22535 (diff)
wargus: init at 2.4.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/games/wargus/default.nix39
-rw-r--r--pkgs/games/wargus/stratagus.nix35
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/games/wargus/default.nix b/pkgs/games/wargus/default.nix
new file mode 100644
index 0000000000000..fda4f792c7b24
--- /dev/null
+++ b/pkgs/games/wargus/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, lib, callPackage, fetchFromGitHub
+, cmake, pkg-config, makeWrapper
+, zlib, bzip2, libpng
+, dialog, python3, cdparanoia
+}:
+
+let
+  stratagus = callPackage ./stratagus.nix {};
+in
+stdenv.mkDerivation rec {
+  pname = "wargus";
+  inherit (stratagus) version;
+
+  src = fetchFromGitHub {
+    owner = "wargus";
+    repo = "wargus";
+    rev = "v${version}";
+    sha256 = "0dibm68jxaqzgzcyblfj2bmwyz9v5ax0njnnbvak7xjk1zlh11sx";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config makeWrapper ];
+  buildInputs = [ zlib bzip2 libpng ];
+  cmakeFlags = [
+    "-DSTRATAGUS=${stratagus}/games/stratagus"
+    "-DSTRATAGUS_INCLUDE_DIR=${stratagus.src}/gameheaders"
+  ];
+  postInstall = ''
+    makeWrapper $out/games/wargus $out/bin/wargus \
+      --prefix PATH : ${lib.makeBinPath [ "$out" cdparanoia python3 ]}
+  '';
+
+  meta = with lib; {
+    description = "Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales";
+    homepage = "https://wargus.github.io/";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.astro ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/games/wargus/stratagus.nix b/pkgs/games/wargus/stratagus.nix
new file mode 100644
index 0000000000000..f029e284f3367
--- /dev/null
+++ b/pkgs/games/wargus/stratagus.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config, makeWrapper
+, zlib, bzip2, libpng, lua5_1, toluapp
+, SDL, SDL_mixer, SDL_image, libGL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "stratagus";
+  version = "2.4.3";
+
+  src = fetchFromGitHub {
+    owner = "wargus";
+    repo = "stratagus";
+    rev = "v${version}";
+    sha256 = "128m5n9axq007xi8a002ig7d4dyw8j060542x220ld66ibfprhcn";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    zlib bzip2 libpng
+    lua5_1 toluapp
+    SDL.dev SDL_image SDL_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;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6e511e1e24f63..73ab313281201 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27429,6 +27429,8 @@ in
     libpng = libpng12;
   };
 
+  wargus = callPackage ../games/wargus { };
+
   warmux = callPackage ../games/warmux { };
 
   warsow-engine = callPackage ../games/warsow/engine.nix { };