2024-02-10 12:38:12 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper, unstableGitUpdater }:
|
2022-12-26 23:12:23 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "nanosaur2";
|
2024-02-10 12:38:12 +00:00
|
|
|
|
version = "2.1.0-unstable-2023-05-21";
|
2022-12-26 23:12:23 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "jorio";
|
|
|
|
|
repo = pname;
|
2024-02-10 12:38:12 +00:00
|
|
|
|
rev = "72d93ed08148d81aa89bab511a9650d7b929d4c7";
|
|
|
|
|
hash = "sha256-1AvM2KTQB9aUYB0e/7Y6h18yQvzsxMOgGkF9zPgTzFo=";
|
2022-12-26 23:12:23 +00:00
|
|
|
|
fetchSubmodules = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
|
|
|
|
makeWrapper
|
|
|
|
|
];
|
|
|
|
|
buildInputs = [
|
|
|
|
|
SDL2
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
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/Nanosaur2"
|
|
|
|
|
mv Data ReadMe.txt "$out/share/Nanosaur2/"
|
|
|
|
|
install -Dm755 {.,$out/bin}/Nanosaur2
|
|
|
|
|
wrapProgram $out/bin/Nanosaur2 --chdir "$out/share/Nanosaur2"
|
2024-02-10 12:38:12 +00:00
|
|
|
|
install -Dm644 $src/packaging/io.jor.nanosaur2.desktop $out/share/applications/nanosaur2.desktop
|
|
|
|
|
install -Dm644 $src/packaging/io.jor.nanosaur2.png $out/share/pixmaps/nanosaur2.png
|
2022-12-26 23:12:23 +00:00
|
|
|
|
runHook postInstall
|
|
|
|
|
'';
|
|
|
|
|
|
2024-02-10 12:38:12 +00:00
|
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
|
2022-12-26 23:12:23 +00:00
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "A port of Nanosaur2, a 2004 Macintosh game by Pangea Software, for modern operating systems";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Nanosaur is a 2004 Macintosh game by Pangea Software.
|
|
|
|
|
|
|
|
|
|
Is a continuation of the original Nanosaur storyline, only this time you get to fly a pterodactyl who’s loaded with hi-tech weaponry.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://github.com/jorio/Nanosaur2";
|
2022-12-27 03:37:57 +00:00
|
|
|
|
license = licenses.cc-by-sa-40;
|
2024-02-10 12:38:12 +00:00
|
|
|
|
mainProgram = "Nanosaur2";
|
2022-12-26 23:12:23 +00:00
|
|
|
|
maintainers = with maintainers; [ lux ];
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
}
|