pokeemerald: init at unstable-2021-08-05

This commit is contained in:
Simon Bruder 2021-08-07 15:07:42 +02:00
parent 2ba4dab672
commit eae392c717
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 43 additions and 0 deletions

View file

@ -24,6 +24,9 @@ final: prev: {
firered = prev.callPackage ./pokefirered { }; firered = prev.callPackage ./pokefirered { };
firered-modern = prev.callPackage ./pokefirered { modern = true; }; firered-modern = prev.callPackage ./pokefirered { modern = true; };
emerald = prev.callPackage ./pokeemerald { };
emerald-modern = prev.callPackage ./pokeemerald { modern = true; };
all = prev.callPackage ./pokeall { }; all = prev.callPackage ./pokeall { };
}; };
} }

40
pokeemerald/default.nix Normal file
View file

@ -0,0 +1,40 @@
{ 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 ];
};
}