From a6488246b2302fc2900391dc65ba2dcd84a35e56 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 7 Aug 2021 11:19:26 +0200 Subject: [PATCH] pokecrystal: init at unstable-2021-07-20 --- default.nix | 2 ++ pokecrystal/default.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 pokecrystal/default.nix diff --git a/default.nix b/default.nix index 8043a5b..9da8a8e 100644 --- a/default.nix +++ b/default.nix @@ -10,6 +10,8 @@ final: prev: { gold = prev.callPackage ./pokegold { }; + crystal = prev.callPackage ./pokecrystal { }; + all = prev.callPackage ./pokeall { }; }; } diff --git a/pokecrystal/default.nix b/pokecrystal/default.nix new file mode 100644 index 0000000..5cb2d25 --- /dev/null +++ b/pokecrystal/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, rgbds }: + +stdenv.mkDerivation rec { + pname = "pokecrystal"; + version = "unstable-2021-07-20"; + + src = fetchFromGitHub { + owner = "pret"; + repo = pname; + rev = "d93c13c94c3680bace68ee2333dd81b1efad1734"; + sha256 = "sha256-x1sVaZVmZP9iX7jkXhh4owGdzcQ8+wwDrV6VkfhtBVk="; + }; + + nativeBuildInputs = [ rgbds ]; + + makeFlags = [ "crystal" "crystal11" ]; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp pokecrystal{,11}.gbc $out + runHook postInstall + ''; + + meta = with lib; { + description = "ROM built from disassembly of Pokémon Crystal"; + homepage = "https://github.com/pret/pokcrystal"; + license = licenses.unfree; + maintainers = with maintainers; [ sbruder ]; + }; +}