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