diff options
author | Peter Hoeg <peter@hoeg.com> | 2018-02-04 21:33:16 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2018-02-12 22:28:06 +0800 |
commit | e88284be2a698d9272ce90d2f5ce5b8d4d24465c (patch) | |
tree | 4b6b9d3be4fd1cb3d3ce6194a22e3358da7a1b31 /pkgs/games/dxx-rebirth | |
parent | 126cc690ac291e2290f3e151866b2bc37c178c8d (diff) |
descent 1&2 assets: init at 2.0.0.7
Diffstat (limited to 'pkgs/games/dxx-rebirth')
-rw-r--r-- | pkgs/games/dxx-rebirth/assets.nix | 55 | ||||
-rw-r--r-- | pkgs/games/dxx-rebirth/full.nix | 30 |
2 files changed, 85 insertions, 0 deletions
diff --git a/pkgs/games/dxx-rebirth/assets.nix b/pkgs/games/dxx-rebirth/assets.nix new file mode 100644 index 000000000000..1fd64f5b00d0 --- /dev/null +++ b/pkgs/games/dxx-rebirth/assets.nix @@ -0,0 +1,55 @@ +{ stdenv, requireFile, gogUnpackHook }: + +let + generic = ver: source: let + pname = "descent${toString ver}"; + in stdenv.mkDerivation rec { + name = "${pname}-assets-${version}"; + version = "2.0.0.7"; + + src = requireFile rec { + name = "setup_descent12_${version}.exe"; + sha256 = "1r1drbfda6czg21f9qqiiwgnkpszxgmcn5bafp5ljddh34swkn3f"; + message = '' + While the Descent ${toString ver} game engine is free, the game assets are not. + + Please purchase the game on gog.com and download the Windows installer. + + Once you have downloaded the file, please use the following command and re-run the + installation: + + nix-prefetch-url file://\$PWD/${name} + ''; + }; + + nativeBuildInputs = [ gogUnpackHook ]; + + dontBuild = true; + dontFixup = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/{games/${pname},doc/${pname}/examples} + pushd "app/${source}" + mv dosbox*.conf $out/share/doc/${pname}/examples + mv *.txt *.pdf $out/share/doc/${pname} + cp -r * $out/share/games/descent${toString ver} + popd + + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "Descent ${toString ver} assets from GOG"; + homepage = http://www.dxx-rebirth.com/; + license = licenses.unfree; + maintainers = with maintainers; [ peterhoeg ]; + hydraPlatforms = []; + }; + }; + +in { + descent1-assets = generic 1 "descent"; + descent2-assets = generic 2 "descent 2"; +} diff --git a/pkgs/games/dxx-rebirth/full.nix b/pkgs/games/dxx-rebirth/full.nix new file mode 100644 index 000000000000..baf8b80add10 --- /dev/null +++ b/pkgs/games/dxx-rebirth/full.nix @@ -0,0 +1,30 @@ +{ stdenv, makeWrapper +, dxx-rebirth, descent1-assets, descent2-assets }: + +let + generic = ver: assets: stdenv.mkDerivation rec { + name = "d${toString ver}x-rebirth-full-${assets.version}"; + + nativeBuildInputs = [ makeWrapper ]; + + buildCommand = '' + mkdir -p $out/bin + + makeWrapper ${dxx-rebirth}/bin/d${toString ver}x-rebirth $out/bin/descent${toString ver} \ + --add-flags "-hogdir ${assets}/share/games/descent${toString ver}" + ''; + + meta = with stdenv.lib; { + description = "Descent ${toString ver} using the DXX-Rebirth project engine and game assets from GOG"; + homepage = http://www.dxx-rebirth.com/; + license = with licenses; [ free unfree ]; + maintainers = with maintainers; [ peterhoeg ]; + platforms = with platforms; linux; + hydraPlatforms = []; + }; + }; + +in { + d1x-rebirth-full = generic 1 descent1-assets; + d2x-rebirth-full = generic 2 descent2-assets; +} |