From cb76df1dab8efcc3746e5396133694d2ccab00d3 Mon Sep 17 00:00:00 2001 From: Lux Date: Tue, 27 Dec 2022 00:12:23 +0100 Subject: [PATCH] Nanosaur2: init at 2.1.0 --- pkgs/games/nanosaur2/default.nix | 56 ++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 58 insertions(+) create mode 100644 pkgs/games/nanosaur2/default.nix diff --git a/pkgs/games/nanosaur2/default.nix b/pkgs/games/nanosaur2/default.nix new file mode 100644 index 000000000000..7b449ac2d920 --- /dev/null +++ b/pkgs/games/nanosaur2/default.nix @@ -0,0 +1,56 @@ +{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "nanosaur2"; + version = "2.1.0"; + + src = fetchFromGitHub { + owner = "jorio"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-UY+fyn8BA/HfCd2LCj5cfGmQACKUICH6CDCW4q6YDkg="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + makeWrapper + ]; + buildInputs = [ + SDL2 + ]; + + configurePhase = '' + runHook preConfigure + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + cmake --build build + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mv build $out + makeWrapper $out/Nanosaur2 $out/bin/Nanosaur2 --chdir "$out" + runHook postInstall + ''; + + 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"; + license = with licenses; [ + cc-by-sa-40 + ]; + maintainers = with maintainers; [ lux ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4061f7ded7ac..eacd5015d292 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34690,6 +34690,8 @@ with pkgs; nanosaur = callPackage ../games/nanosaur { }; + nanosaur2 = callPackage ../games/nanosaur2 { }; + nethack = callPackage ../games/nethack { }; nethack-qt = callPackage ../games/nethack {