summary refs log tree commit diff
path: root/pkgs/games/dxx-rebirth
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-01-15 10:53:21 +0800
committerPeter Hoeg <peter@hoeg.com>2018-01-18 18:07:55 +0800
commite3b0d095913e2fa140925b5ff6d998b34c938334 (patch)
tree20546b89996d71c809dd8872e72066ed08c38c66 /pkgs/games/dxx-rebirth
parent4dec2618b3f3d85bfb07c56967c56dedf2770b27 (diff)
downloadnixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.tar
nixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.tar.gz
nixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.tar.bz2
nixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.tar.lz
nixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.tar.xz
nixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.tar.zst
nixpkgs-e3b0d095913e2fa140925b5ff6d998b34c938334.zip
dxx-rebirth: 0.58.1 -> 0.59.100
d1x-rebirth and d2x-rebirth now share the same source, so we build one package
instead of 2.
Diffstat (limited to 'pkgs/games/dxx-rebirth')
-rw-r--r--pkgs/games/dxx-rebirth/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/games/dxx-rebirth/default.nix b/pkgs/games/dxx-rebirth/default.nix
new file mode 100644
index 00000000000..9645a89b3b2
--- /dev/null
+++ b/pkgs/games/dxx-rebirth/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, scons, pkgconfig
+, SDL, SDL_mixer, mesa, physfs
+}:
+
+let
+  music = fetchurl {
+    url = "http://www.dxx-rebirth.com/download/dxx/res/d2xr-sc55-music.dxa";
+    sha256 = "05mz77vml396mff43dbs50524rlm4fyds6widypagfbh5hc55qdc";
+  };
+
+in stdenv.mkDerivation rec {
+  name = "dxx-rebirth-${version}";
+  version = "0.59.100";
+
+  src = fetchurl {
+    url = "http://www.dxx-rebirth.com/download/dxx/dxx-rebirth_v${version}-src.tar.gz";
+    sha256 = "0m9k34zyr8bbni9szip407mffdpwbqszgfggavgqjwq0k9c1w7ka";
+  };
+
+  nativeBuildInputs = [ pkgconfig scons ];
+
+  buildInputs = [ mesa physfs SDL SDL_mixer ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    scons prefix=$out install
+    install -Dm644 ${music} $out/share/games/dxx-rebirth/d2xr-sc55-music.dxa
+    install -Dm644 -t $out/share/doc/dxx-rebirth *.txt
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Source Port of the Descent 1 and 2 engines";
+    homepage = http://www.dxx-rebirth.com/;
+    license = licenses.free;
+    maintainers = with maintainers; [ viric ];
+    platforms = with platforms; linux;
+  };
+}