diff options
| author | Sander van der Burg <svanderburg@gmail.com> | 2021-07-28 21:29:23 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2021-07-30 16:13:07 +0000 |
| commit | 10320a355a754145851d0034d4df399b5e478bfd (patch) | |
| tree | a867353c17dd0c8b6f2eaab8cfc9b219a20e4542 | |
| parent | Merge pull request #132028 from NixOS/backport-132011-to-release-21.05 (diff) | |
| download | nixpkgs-10320a355a754145851d0034d4df399b5e478bfd.tar.gz | |
rott: init at 1.1.2
(cherry picked from commit 946ad968ffcb623d6473228c4390bf4262024e91)
| -rw-r--r-- | pkgs/games/rott/default.nix | 54 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
2 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/games/rott/default.nix b/pkgs/games/rott/default.nix new file mode 100644 index 000000000000..cac357faf2e0 --- /dev/null +++ b/pkgs/games/rott/default.nix @@ -0,0 +1,54 @@ +{stdenv, lib, fetchurl, SDL, SDL_mixer, makeDesktopItem, copyDesktopItems, runtimeShell, buildShareware ? false}: + +stdenv.mkDerivation rec { + pname = "rott"; + version = "1.1.2"; + + src = fetchurl { + url = "https://icculus.org/rott/releases/${pname}-${version}.tar.gz"; + sha256 = "1zr7v5dv2iqx40gzxbg8mhac7fxz3kqf28y6ysxv1xhjqgl1c98h"; + }; + + nativeBuildInputs = [ copyDesktopItems ]; + buildInputs = [ SDL SDL_mixer ]; + + preBuild = '' + cd rott + make clean + make SHAREWARE=${if buildShareware then "1" else "0"} + ''; + + # 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. + + installPhase = '' + mkdir -p $out/bin + cp rott $out/bin + + cat > $out/bin/launch-rott <<EOF + #! ${runtimeShell} -e + cd ~/.rott/data + exec $out/bin/rott + EOF + + chmod +x $out/bin/launch-rott + + runHook postInstall + ''; + + desktopItems = [ + (makeDesktopItem { + name = "rott"; + exec = "launch-rott"; + desktopName = "Rise of the Triad: ${if buildShareware then "The HUNT Begins" else "Dark War"}"; + categories = "Game;"; + }) + ]; + + meta = with lib; { + description = "SDL port of Rise of the Triad"; + homepage = "https://icculus.org/rott/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ sander ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 87f260b61175..1cf5b9568296 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28629,6 +28629,12 @@ in rocksndiamonds = callPackage ../games/rocksndiamonds { }; + rott = callPackage ../games/rott { }; + + rott-shareware = rott.override { + buildShareware = true; + }; + rrootage = callPackage ../games/rrootage { }; saga = libsForQt5.callPackage ../applications/gis/saga { |
