python312Packages.lightning-utilities: 0.11.9 -> 0.12.0 (#378243)
[NixPkgs.git] / pkgs / games / dxx-rebirth / assets.nix
blobfb37b540068e6b01c8bd7c3235ad12ebe171b65d
2   lib,
3   stdenv,
4   requireFile,
5   gogUnpackHook,
6 }:
8 let
9   generic =
10     ver: source:
11     let
12       pname = "descent${toString ver}";
13     in
14     stdenv.mkDerivation rec {
15       name = "${pname}-assets-${version}";
16       version = "2.0.0.7";
18       src = requireFile rec {
19         name = "setup_descent12_${version}.exe";
20         sha256 = "1r1drbfda6czg21f9qqiiwgnkpszxgmcn5bafp5ljddh34swkn3f";
21         message = ''
22           While the Descent ${toString ver} game engine is free, the game assets are not.
24           Please purchase the game on gog.com and download the Windows installer.
26           Once you have downloaded the file, please use the following command and re-run the
27           installation:
29           nix-prefetch-url file://\$PWD/${name}
30         '';
31       };
33       nativeBuildInputs = [ gogUnpackHook ];
35       dontBuild = true;
36       dontFixup = true;
38       installPhase = ''
39         runHook preInstall
41         mkdir -p $out/share/{games/${pname},doc/${pname}/examples}
42         pushd "app/${source}"
43         mv dosbox*.conf $out/share/doc/${pname}/examples
44         mv *.txt *.pdf  $out/share/doc/${pname}
45         cp -r * $out/share/games/descent${toString ver}
46         popd
48         runHook postInstall
49       '';
51       meta = with lib; {
52         description = "Descent ${toString ver} assets from GOG";
53         homepage = "https://www.dxx-rebirth.com/";
54         license = licenses.unfree;
55         maintainers = with maintainers; [ peterhoeg ];
56         hydraPlatforms = [ ];
57       };
58     };
62   descent1-assets = generic 1 "descent";
63   descent2-assets = generic 2 "descent 2";