10 , buildShareware ? false
14 # Allow the game to be launched from a user's PATH and load the game data from the user's home directory.
15 launcher = writeShellScript "rott" ''
18 test -e $dir || mkdir -p $dir
20 exec @out@/libexec/rott "$@"
24 stdenv.mkDerivation rec {
29 url = "https://icculus.org/rott/releases/${pname}-${version}.tar.gz";
30 sha256 = "1zr7v5dv2iqx40gzxbg8mhac7fxz3kqf28y6ysxv1xhjqgl1c98h";
33 nativeBuildInputs = [ copyDesktopItems ];
35 buildInputs = [ SDL SDL_mixer ];
37 sourceRoot = "rott-${version}/rott";
40 "SHAREWARE=${if buildShareware then "1" else "0"}"
43 # when using SDL_compat instead of SDL_classic, SDL_mixer isn't correctly
44 # detected, but there is no harm just specifying it
45 NIX_CFLAGS_COMPILE = [
46 "-I${lib.getDev SDL_mixer}/include/SDL"
52 install -Dm555 -t $out/libexec rott
53 install -Dm555 ${launcher} $out/bin/${launcher.name}
54 substituteInPlace $out/bin/rott --subst-var out
63 desktopName = "Rise of the Triad: ${if buildShareware then "The HUNT Begins" else "Dark War"}";
64 categories = [ "Game" ];
69 description = "SDL port of Rise of the Triad";
70 homepage = "https://icculus.org/rott/";
71 license = licenses.gpl2Plus;
72 maintainers = with maintainers; [ sander ];
73 platforms = platforms.all;