2021-01-28 08:48:49 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, SDL2
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "x16-emulator";
|
2022-04-24 03:19:43 +00:00
|
|
|
version = "40";
|
2021-01-28 08:48:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "commanderx16";
|
|
|
|
repo = pname;
|
|
|
|
rev = "r${version}";
|
2022-04-24 03:19:43 +00:00
|
|
|
hash = "sha256-7ZzVd2NJCFNAFrS2cj6bxcq/AzO5VakoFX9o1Ac9egg=";
|
2021-01-28 08:48:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
buildInputs = [ SDL2 ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2022-04-24 03:19:43 +00:00
|
|
|
|
|
|
|
install -Dm 755 -t $out/bin/ x16emu
|
|
|
|
install -Dm 444 -t $out/share/doc/${pname} README.md
|
|
|
|
|
2021-01-28 08:48:49 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The official emulator of CommanderX16 8-bit computer";
|
2022-05-05 00:46:39 +00:00
|
|
|
homepage = "https://www.commanderx16.com/forum/index.php?/home/";
|
2021-01-28 08:48:49 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2022-05-05 00:46:39 +00:00
|
|
|
mainProgram = "x16emu";
|
2022-04-24 03:19:43 +00:00
|
|
|
inherit (SDL2.meta) platforms;
|
2021-01-28 08:48:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
# upstream project recommends emulator and rom synchronized;
|
|
|
|
# passing through the version is useful to ensure this
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|