about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/wargus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/wargus/default.nix')
-rw-r--r--nixpkgs/pkgs/games/wargus/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/wargus/default.nix b/nixpkgs/pkgs/games/wargus/default.nix
new file mode 100644
index 000000000000..fda4f792c7b2
--- /dev/null
+++ b/nixpkgs/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;
+  };
+}