2021-12-29 19:24:45 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, SDL2, cmake, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "OttoMatic";
|
2023-02-04 04:56:22 +00:00
|
|
|
version = "4.0.1";
|
2021-12-29 19:24:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jorio";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-04 04:56:22 +00:00
|
|
|
sha256 = "sha256-0mqOAdAmJGxKa6yXktrbmdXkoQIliimq37iy9bCBZYg=";
|
2021-12-29 19:24:45 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
2022-12-27 10:21:10 +00:00
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
];
|
|
|
|
|
2021-12-29 19:24:45 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2022-12-27 10:21:10 +00:00
|
|
|
mkdir -p "$out/bin"
|
2023-04-25 20:18:48 +00:00
|
|
|
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"
|
2023-04-25 19:09:54 +00:00
|
|
|
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
|
2021-12-29 19:24:45 +00:00
|
|
|
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";
|
2022-12-27 03:37:57 +00:00
|
|
|
license = licenses.cc-by-sa-40;
|
2021-12-29 19:24:45 +00:00
|
|
|
maintainers = with maintainers; [ lux ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|