1 { lib, stdenv, requireFile, gogUnpackHook }:
4 generic = ver: source: let
5 pname = "descent${toString ver}";
6 in stdenv.mkDerivation rec {
7 name = "${pname}-assets-${version}";
10 src = requireFile rec {
11 name = "setup_descent12_${version}.exe";
12 sha256 = "1r1drbfda6czg21f9qqiiwgnkpszxgmcn5bafp5ljddh34swkn3f";
14 While the Descent ${toString ver} game engine is free, the game assets are not.
16 Please purchase the game on gog.com and download the Windows installer.
18 Once you have downloaded the file, please use the following command and re-run the
21 nix-prefetch-url file://\$PWD/${name}
25 nativeBuildInputs = [ gogUnpackHook ];
33 mkdir -p $out/share/{games/${pname},doc/${pname}/examples}
35 mv dosbox*.conf $out/share/doc/${pname}/examples
36 mv *.txt *.pdf $out/share/doc/${pname}
37 cp -r * $out/share/games/descent${toString ver}
44 description = "Descent ${toString ver} assets from GOG";
45 homepage = "https://www.dxx-rebirth.com/";
46 license = licenses.unfree;
47 maintainers = with maintainers; [ peterhoeg ];
53 descent1-assets = generic 1 "descent";
54 descent2-assets = generic 2 "descent 2";