nixpkgs/pkgs/applications/emulators/commanderx16/rom.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.1 KiB
Nix
Raw Normal View History

2021-01-28 08:50:55 +00:00
{ stdenv
, lib
, fetchFromGitHub
, cc65
2022-04-24 03:12:46 +00:00
, python3
2021-01-28 08:50:55 +00:00
}:
2022-08-09 02:25:58 +00:00
stdenv.mkDerivation (finalAttrs: {
2021-01-28 08:50:55 +00:00
pname = "x16-rom";
2022-08-09 02:25:58 +00:00
version = "41";
2021-01-28 08:50:55 +00:00
src = fetchFromGitHub {
owner = "commanderx16";
2022-08-09 02:25:58 +00:00
repo = "x16-rom";
rev = "r${finalAttrs.version}";
hash = "sha256-kowdyUVi3hliqkL8VQo5dS3Dpxd4LQi5+5brkdnv0lE=";
2021-01-28 08:50:55 +00:00
};
2022-04-24 03:12:46 +00:00
nativeBuildInputs = [
cc65
python3
];
2021-01-28 08:50:55 +00:00
postPatch = ''
patchShebangs scripts/
'';
dontConfigure = true;
installPhase = ''
runHook preInstall
2022-04-24 03:12:46 +00:00
2022-08-09 02:25:58 +00:00
install -Dm 444 -t $out/share/x16-rom/ build/x16/rom.bin
install -Dm 444 -t $out/share/doc/x16-rom/ README.md
2022-04-24 03:12:46 +00:00
2021-01-28 08:50:55 +00:00
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.commanderx16.com/forum/index.php?/home/";
description = "ROM file for CommanderX16 8-bit computer";
license = licenses.bsd2;
maintainers = with maintainers; [ AndersonTorres ];
2022-04-24 03:12:46 +00:00
inherit (cc65.meta) platforms;
broken = with stdenv; isDarwin && isAarch64;
2021-01-28 08:50:55 +00:00
};
passthru = {
2022-08-09 02:25:58 +00:00
# upstream project recommends emulator and rom to be synchronized;
2021-01-28 08:50:55 +00:00
# passing through the version is useful to ensure this
2022-08-09 02:25:58 +00:00
inherit (finalAttrs) version;
2021-01-28 08:50:55 +00:00
};
2022-08-09 02:25:58 +00:00
})