depot/third_party/nixpkgs/pkgs/games/otto-matic/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

44 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper }:
stdenv.mkDerivation rec {
pname = "OttoMatic";
version = "4.0.1";
src = fetchFromGitHub {
owner = "jorio";
repo = pname;
rev = version;
sha256 = "sha256-0mqOAdAmJGxKa6yXktrbmdXkoQIliimq37iy9bCBZYg=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
makeWrapper
];
buildInputs = [
SDL2
];
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
mkdir -p "$out/share/OttoMatic"
mv Data ReadMe.txt "$out/share/OttoMatic/"
install -Dm755 {.,$out/bin}/OttoMatic
wrapProgram $out/bin/OttoMatic --chdir "$out/share/OttoMatic"
install -Dm644 $src/packaging/io.jor.ottomatic.desktop $out/share/applications/io.jor.ottomatic.desktop
install -Dm644 $src/packaging/io.jor.ottomatic.png $out/share/pixmaps/io.jor.ottomatic.png
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 = licenses.cc-by-sa-40;
maintainers = with maintainers; [ lux ];
platforms = platforms.linux;
};
}