2024-02-10 12:12:35 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper, unstableGitUpdater }:
|
2021-12-14 18:50:33 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "nanosaur";
|
2024-04-08 07:15:11 +00:00
|
|
|
|
version = "1.4.4-unstable-2024-04-06";
|
2021-12-14 18:50:33 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "jorio";
|
|
|
|
|
repo = pname;
|
2024-04-08 07:15:11 +00:00
|
|
|
|
rev = "4f2612f81697a0852f63fa2ea1ac80892f8a5a9c";
|
|
|
|
|
hash = "sha256-MQmlZbsQSREAIqKXyIIOF6Psa1rqY/iUsBHpeKGekBI=";
|
2021-12-14 18:50:33 +00:00
|
|
|
|
fetchSubmodules = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-27 09:24:25 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
|
|
|
|
makeWrapper
|
|
|
|
|
];
|
2021-12-14 18:50:33 +00:00
|
|
|
|
buildInputs = [
|
|
|
|
|
SDL2
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-12-27 09:24:25 +00:00
|
|
|
|
runHook preInstall
|
2022-12-27 10:21:10 +00:00
|
|
|
|
mkdir -p "$out/bin"
|
2023-04-25 20:18:48 +00:00
|
|
|
|
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"
|
2024-02-10 12:12:35 +00:00
|
|
|
|
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
|
2022-12-27 09:24:25 +00:00
|
|
|
|
runHook postInstall
|
2021-12-14 18:50:33 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2024-02-10 12:12:35 +00:00
|
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
|
2021-12-14 18:50:33 +00:00
|
|
|
|
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, you’re a cybernetic dinosaur from the future who’s 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";
|
2022-12-27 03:37:57 +00:00
|
|
|
|
license = licenses.cc-by-sa-40;
|
2024-02-10 12:12:35 +00:00
|
|
|
|
mainProgram = "Nanosaur";
|
2021-12-14 18:50:33 +00:00
|
|
|
|
maintainers = with maintainers; [ lux ];
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
}
|