Merge pull request #131864 from svanderburg/add-rott

rott: init at 1.1.2

authored by Sander van der Burg and committed by GitHub 00486ec9 44b0d803

+60
+54
pkgs/games/rott/default.nix
··· 1 + {stdenv, lib, fetchurl, SDL, SDL_mixer, makeDesktopItem, copyDesktopItems, runtimeShell, buildShareware ? false}: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "rott"; 5 + version = "1.1.2"; 6 + 7 + src = fetchurl { 8 + url = "https://icculus.org/rott/releases/${pname}-${version}.tar.gz"; 9 + sha256 = "1zr7v5dv2iqx40gzxbg8mhac7fxz3kqf28y6ysxv1xhjqgl1c98h"; 10 + }; 11 + 12 + nativeBuildInputs = [ copyDesktopItems ]; 13 + buildInputs = [ SDL SDL_mixer ]; 14 + 15 + preBuild = '' 16 + cd rott 17 + make clean 18 + make SHAREWARE=${if buildShareware then "1" else "0"} 19 + ''; 20 + 21 + # Include a wrapper script to allow the game to be launched from a user's PATH and load the game data from the user's home directory. 22 + 23 + installPhase = '' 24 + mkdir -p $out/bin 25 + cp rott $out/bin 26 + 27 + cat > $out/bin/launch-rott <<EOF 28 + #! ${runtimeShell} -e 29 + cd ~/.rott/data 30 + exec $out/bin/rott 31 + EOF 32 + 33 + chmod +x $out/bin/launch-rott 34 + 35 + runHook postInstall 36 + ''; 37 + 38 + desktopItems = [ 39 + (makeDesktopItem { 40 + name = "rott"; 41 + exec = "launch-rott"; 42 + desktopName = "Rise of the Triad: ${if buildShareware then "The HUNT Begins" else "Dark War"}"; 43 + categories = "Game;"; 44 + }) 45 + ]; 46 + 47 + meta = with lib; { 48 + description = "SDL port of Rise of the Triad"; 49 + homepage = "https://icculus.org/rott/"; 50 + license = licenses.gpl2Plus; 51 + maintainers = with maintainers; [ sander ]; 52 + platforms = platforms.all; 53 + }; 54 + }
+6
pkgs/top-level/all-packages.nix
··· 29498 29498 29499 29499 rocksndiamonds = callPackage ../games/rocksndiamonds { }; 29500 29500 29501 + rott = callPackage ../games/rott { }; 29502 + 29503 + rott-shareware = rott.override { 29504 + buildShareware = true; 29505 + }; 29506 + 29501 29507 rrootage = callPackage ../games/rrootage { }; 29502 29508 29503 29509 saga = libsForQt5.callPackage ../applications/gis/saga {