From bcc86206fb03c6c25547a5531cc63abccbadd190 Mon Sep 17 00:00:00 2001 From: Lux Date: Wed, 29 Dec 2021 20:24:45 +0100 Subject: [PATCH] otto-matic: init at 4.0.0 --- pkgs/games/otto-matic/default.nix | 44 +++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 46 insertions(+) create mode 100644 pkgs/games/otto-matic/default.nix diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix new file mode 100644 index 000000000000..e213deabe859 --- /dev/null +++ b/pkgs/games/otto-matic/default.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "OttoMatic"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "jorio"; + repo = pname; + rev = version; + sha256 = "sha256:1yd4clks7kr2hn69c4q1ykc92sw6axbspambm03viapr834bjz3q"; + fetchSubmodules = true; + }; + + buildInputs = [ + SDL2 + ]; + + nativeBuildInputs = [ + cmake + makeWrapper + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/OttoMatic + mv Data $out/share/OttoMatic + install -Dm755 {.,$out/bin}/OttoMatic + wrapProgram $out/bin/OttoMatic --run "cd $out/share/OttoMatic" + + runHook postInstall + ''; + + meta = with lib; { + description = "A port of Otto Matic, a 2001 Macintosh game by Pangea Software, for modern operating systems"; + homepage = "https://github.com/jorio/OttoMatic"; + 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 15186d004ddf..378c2ae651ab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32011,6 +32011,8 @@ with pkgs; otter = callPackage ../applications/science/logic/otter {}; + otto-matic = callPackage ../games/otto-matic { }; + picosat = callPackage ../applications/science/logic/picosat {}; libpoly = callPackage ../applications/science/logic/poly {};