pokefirered: init at unstable-2021-08-01
This commit is contained in:
parent
336d0e18cf
commit
2ba4dab672
|
@ -21,6 +21,9 @@ final: prev: {
|
|||
ruby-de = prev.callPackage ./pokeruby { german = true; }; # german version
|
||||
ruby-de-modern = prev.callPackage ./pokeruby { german = true; modern = true; };
|
||||
|
||||
firered = prev.callPackage ./pokefirered { };
|
||||
firered-modern = prev.callPackage ./pokefirered { modern = true; };
|
||||
|
||||
all = prev.callPackage ./pokeall { };
|
||||
};
|
||||
}
|
||||
|
|
46
pokefirered/default.nix
Normal file
46
pokefirered/default.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchFromGitHub, gcc-arm-embedded, libpng, agbcc, modern ? false, roms ? null }:
|
||||
let
|
||||
roms' =
|
||||
if roms == null
|
||||
then [ "firered" "firered_rev1" "leafgreen" "leafgreen_rev1" ]
|
||||
else roms;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pokefirered${lib.optionalString modern "-modern"}";
|
||||
version = "unstable-2021-08-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pret";
|
||||
repo = "pokefirered";
|
||||
rev = "feb54289376a5fafb49f4a1ac35e7b07c79bcd2c";
|
||||
sha256 = "sha256-3uXq8a50b/DwdMBbXTX3G3YBFcWnar9hxSadPEnMIsA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gcc-arm-embedded ];
|
||||
buildInputs = [ libpng ];
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${agbcc}/tools/agbcc tools/
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"TOOLCHAIN=${gcc-arm-embedded}"
|
||||
"MODERN=${if modern then "1" else "0"}"
|
||||
] ++ roms';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp poke{${lib.concatStringsSep "," roms'}}${lib.optionalString modern "_modern"}.gba $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "ROM built from disassembly of Pokémon FireRed/LeafGreen";
|
||||
homepage = "https://github.com/pret/pokeemerald";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ sbruder ];
|
||||
};
|
||||
}
|
Reference in a new issue