11 buildShareware ? false,
15 # Allow the game to be launched from a user's PATH and load the game data from the user's home directory.
16 launcher = writeShellScript "rott" ''
19 test -e $dir || mkdir -p $dir
21 exec @out@/libexec/rott "$@"
25 stdenv.mkDerivation rec {
30 url = "https://icculus.org/rott/releases/${pname}-${version}.tar.gz";
31 sha256 = "1zr7v5dv2iqx40gzxbg8mhac7fxz3kqf28y6ysxv1xhjqgl1c98h";
34 nativeBuildInputs = [ copyDesktopItems ];
41 sourceRoot = "rott-${version}/rott";
44 "SHAREWARE=${if buildShareware then "1" else "0"}"
47 # when using SDL_compat instead of SDL1, SDL_mixer isn't correctly detected,
48 # but there is no harm just specifying it
49 env.NIX_CFLAGS_COMPILE = toString [
50 "-I${lib.getDev SDL_mixer}/include/SDL"
56 install -Dm555 -t $out/libexec rott
57 install -Dm555 ${launcher} $out/bin/${launcher.name}
58 substituteInPlace $out/bin/rott --subst-var out
67 desktopName = "Rise of the Triad: ${if buildShareware then "The HUNT Begins" else "Dark War"}";
68 categories = [ "Game" ];
73 description = "SDL port of Rise of the Triad";
75 homepage = "https://icculus.org/rott/";
76 license = licenses.gpl2Plus;
77 maintainers = with maintainers; [ sander ];
78 platforms = platforms.all;