41 lines
1.0 KiB
Nix
41 lines
1.0 KiB
Nix
{ lib, stdenv, fetchFromGitHub, libpng, agbcc, gcc-arm-embedded, modern ? false }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pokeemerald${lib.optionalString modern "-modern"}";
|
|
version = "unstable-2021-08-05";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pret";
|
|
repo = "pokeemerald";
|
|
rev = "0e33df21b9cbc1f3f7f7bdb4efb9ae0d0c7728cf";
|
|
sha256 = "sha256-6Z0lZrZgAMDQMSbbHcjOpab+IWACVJkei+lfFAZh09s=";
|
|
};
|
|
|
|
buildInputs = [ libpng ];
|
|
|
|
postPatch = ''
|
|
ln -s ${agbcc}/tools/agbcc tools/
|
|
'';
|
|
|
|
makeFlags = [
|
|
"TOOLCHAIN=${gcc-arm-embedded}"
|
|
"MODERN=${if modern then "1" else "0"}"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out
|
|
cp pokeemerald${lib.optionalString modern "_modern"}.gba $out
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "ROM built from disassembly of Pokémon Emerald";
|
|
homepage = "https://github.com/pret/pokeemerald";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ sbruder ];
|
|
};
|
|
}
|