summary refs log tree commit diff
path: root/pkgs/games/otto-matic
diff options
context:
space:
mode:
authorLux <lux@lux.name>2021-12-29 20:24:45 +0100
committerLux <lux@lux.name>2021-12-29 22:06:55 +0100
commitbcc86206fb03c6c25547a5531cc63abccbadd190 (patch)
treef8163ef61cd255798b60444a5758bbabed6df27c /pkgs/games/otto-matic
parentff202a635d2a424c7a16682a9bc2779d8d2eebeb (diff)
downloadnixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.tar
nixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.tar.gz
nixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.tar.bz2
nixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.tar.lz
nixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.tar.xz
nixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.tar.zst
nixpkgs-bcc86206fb03c6c25547a5531cc63abccbadd190.zip
otto-matic: init at 4.0.0
Diffstat (limited to 'pkgs/games/otto-matic')
-rw-r--r--pkgs/games/otto-matic/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix
new file mode 100644
index 00000000000..e213deabe85
--- /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;
+  };
+}