2021-12-14 19:50:33 +01:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper }:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "nanosaur";
|
|
|
|
|
version = "unstable-2021-12-03";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "jorio";
|
|
|
|
|
repo = pname;
|
|
|
|
|
rev = "b567a3e6d7fd1cbc43800cfaa1bd82f31c6d9fae";
|
|
|
|
|
sha256 = "sha256-P/o6uSwUV6O8u8XNXN9YyA8XlgEUkqGj3SC+oD2/GKQ=";
|
|
|
|
|
fetchSubmodules = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-27 10:24:25 +01:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
|
|
|
|
makeWrapper
|
|
|
|
|
];
|
2021-12-14 19:50:33 +01:00
|
|
|
|
buildInputs = [
|
|
|
|
|
SDL2
|
|
|
|
|
];
|
|
|
|
|
|
2022-12-27 11:21:10 +01:00
|
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
2021-12-14 19:50:33 +01:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-12-27 10:24:25 +01:00
|
|
|
|
runHook preInstall
|
2022-12-27 11:21:10 +01:00
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
|
mv Nanosaur Data ReadMe.txt "$out/"
|
2022-03-14 19:06:00 +01:00
|
|
|
|
makeWrapper $out/Nanosaur $out/bin/Nanosaur --chdir "$out"
|
2022-12-27 10:24:25 +01:00
|
|
|
|
runHook postInstall
|
2021-12-14 19:50:33 +01:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "A 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 04:37:57 +01:00
|
|
|
|
license = licenses.cc-by-sa-40;
|
2021-12-14 19:50:33 +01:00
|
|
|
|
maintainers = with maintainers; [ lux ];
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
}
|