hercules-ci / flake-parts

❄️ Simplify Nix Flakes with the module system
https://flake.parts
MIT License
721 stars 41 forks source link

perSystem is too eager by default #160

Closed figsoda closed 1 year ago

figsoda commented 1 year ago
# flake.nix
{
  outputs = inputs@{ flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      flake.devShells = throw "devShells";

      systems = [
        "aarch64-darwin"
        "aarch64-linux"
        "x86_64-darwin"
        "x86_64-linux"
      ];

      perSystem = { self', ... }: {
        checks = {
          foo.type = "derivation";
          bar = self'.checks.foo;
        };
      };
    };
}
$ nix eval .#checks 
error: devShells
(use '--show-trace' to show detailed location information)