From e3b0d095913e2fa140925b5ff6d998b34c938334 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Mon, 15 Jan 2018 10:53:21 +0800 Subject: [PATCH] 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. --- pkgs/games/d1x-rebirth/default.nix | 24 ----------------- pkgs/games/d2x-rebirth/default.nix | 24 ----------------- pkgs/games/dxx-rebirth/default.nix | 43 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 ++++-- 4 files changed, 49 insertions(+), 50 deletions(-) delete mode 100644 pkgs/games/d1x-rebirth/default.nix delete mode 100644 pkgs/games/d2x-rebirth/default.nix create mode 100644 pkgs/games/dxx-rebirth/default.nix diff --git a/pkgs/games/d1x-rebirth/default.nix b/pkgs/games/d1x-rebirth/default.nix deleted file mode 100644 index 52aec1b8a590..000000000000 --- a/pkgs/games/d1x-rebirth/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, physfs, SDL_mixer }: - -stdenv.mkDerivation rec { - name = "d1x-rebirth-0.58.1"; - src = fetchurl { - url = "http://www.dxx-rebirth.com/download/dxx/d1x-rebirth_v0.58.1-src.tar.gz"; - sha256 = "13p3nfqaa78h6bl0k8mdsn90ai99wbqaj6qlsjsgsn8imficivsv"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ scons SDL mesa physfs SDL_mixer ]; - - installPhase = '' - scons prefix=$out install - ''; - - meta = { - homepage = http://www.dxx-rebirth.com/; - description = "Source Port of the Descent 1 engine"; - license = stdenv.lib.licenses.unfree; - platforms = with stdenv.lib.platforms; linux; - maintainers = with stdenv.lib.maintainers; [viric]; - }; -} diff --git a/pkgs/games/d2x-rebirth/default.nix b/pkgs/games/d2x-rebirth/default.nix deleted file mode 100644 index 566b6f8cc82d..000000000000 --- a/pkgs/games/d2x-rebirth/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, physfs, SDL_mixer }: - -stdenv.mkDerivation rec { - name = "d2x-rebirth-0.58.1"; - src = fetchurl { - url = "http://www.dxx-rebirth.com/download/dxx/d2x-rebirth_v0.58.1-src.tar.gz"; - sha256 = "08mg831afc1v068c0ds70lhmxk8a54494jls7s9hwf02ffhv3sx8"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ scons SDL mesa physfs SDL_mixer ]; - - installPhase = '' - scons prefix=$out install - ''; - - meta = { - homepage = http://www.dxx-rebirth.com/; - description = "Source Port of the Descent 2 engine"; - license = stdenv.lib.licenses.unfree; - platforms = with stdenv.lib.platforms; linux; - maintainers = with stdenv.lib.maintainers; [viric]; - }; -} diff --git a/pkgs/games/dxx-rebirth/default.nix b/pkgs/games/dxx-rebirth/default.nix new file mode 100644 index 000000000000..9645a89b3b2c --- /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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b8dcc7103a80..18c773ea6b4c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18094,9 +18094,13 @@ with pkgs; dwarf-therapist = dwarf-fortress-packages.dwarf-therapist; - d1x_rebirth = callPackage ../games/d1x-rebirth { }; + dxx-rebirth = callPackage ../games/dxx-rebirth { + physfs = physfs_2; + }; - d2x_rebirth = callPackage ../games/d2x-rebirth { }; + d1x_rebirth = dxx-rebirth; + + d2x_rebirth = dxx-rebirth; easyrpg-player = callPackage ../games/easyrpg-player { };