depot/third_party/nixpkgs/pkgs/games/nanosaur/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

50 lines
1.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper, unstableGitUpdater }:
stdenv.mkDerivation rec {
pname = "nanosaur";
version = "1.4.4-unstable-2024-04-06";
src = fetchFromGitHub {
owner = "jorio";
repo = pname;
rev = "4f2612f81697a0852f63fa2ea1ac80892f8a5a9c";
hash = "sha256-MQmlZbsQSREAIqKXyIIOF6Psa1rqY/iUsBHpeKGekBI=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
makeWrapper
];
buildInputs = [
SDL2
];
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
mkdir -p "$out/share/Nanosaur"
mv Data ReadMe.txt "$out/share/Nanosaur/"
install -Dm755 {.,$out/bin}/Nanosaur
wrapProgram $out/bin/Nanosaur --chdir "$out/share/Nanosaur"
install -Dm644 $src/packaging/io.jor.nanosaur.desktop $out/share/applications/nanosaur.desktop
install -Dm644 $src/packaging/io.jor.nanosaur.png $out/share/pixmaps/nanosaur-desktopicon.png
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Port of Nanosaur, a 1998 Macintosh game by Pangea Software, for modern operating systems";
longDescription = ''
Nanosaur is a 1998 Macintosh game by Pangea Software.
In it, youre a cybernetic dinosaur from the future whos sent back in time 20 minutes before a giant asteroid hits the Earth.
And you get to shoot at T-Rexes with nukes.
'';
homepage = "https://github.com/jorio/Nanosaur";
license = licenses.cc-by-sa-40;
mainProgram = "Nanosaur";
maintainers = with maintainers; [ lux ];
platforms = platforms.linux;
};
}