55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{
|
|
description = "A nixpkgs overlay for compiling/assembling Game Boy Pokémon ROMs";
|
|
|
|
inputs = {
|
|
# Until https://github.com/NixOS/nixpkgs/pull/132928 gets merged, this fork
|
|
# has to be used because the ROMs require rgbds 0.5.1.
|
|
nixpkgs.url = "github:sbruder/nixpkgs/update-rgbds";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
nix-pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix/master";
|
|
nix-pre-commit-hooks.inputs.flake-utils.follows = "flake-utils";
|
|
nix-pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, nix-pre-commit-hooks }:
|
|
let
|
|
inherit (nixpkgs) lib;
|
|
in
|
|
{
|
|
overlay = import ./default.nix;
|
|
} // (flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.overlay ];
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
in
|
|
rec {
|
|
checks = {
|
|
pre-commit-check = nix-pre-commit-hooks.lib.${system}.run {
|
|
src = self;
|
|
hooks = {
|
|
nixpkgs-fmt.enable = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
devShell = pkgs.mkShell {
|
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
|
};
|
|
|
|
packages = flake-utils.lib.flattenTree {
|
|
inherit (pkgs)
|
|
agbcc
|
|
pokegb;
|
|
};
|
|
|
|
defaultPackage = packages."pokegb/all";
|
|
}));
|
|
}
|