A flake checker (treefmt & nix-unit) for testing other flakes with zero dependencies.

Expose as functor

+19 -20
+9 -19
default.nix
··· 1 - { inputs, ... }: 1 + inputs: 2 2 let 3 - flakeModule = { 4 - systems = import inputs.systems; 5 - imports = [ 6 - inputs.flake-parts.flakeModules.flakeModules 7 - ./perSystem-lib.nix 8 - ./tests.nix 9 - ./treefmt.nix 10 - ]; 11 - }; 12 - in 13 - { 14 - imports = [ flakeModule ]; 15 - flake.flakeModules.default = flakeModule; 16 - 17 - flake.lib.mkFlake = 18 - newInputs: newModule: 3 + functor = 4 + _: newInputs: newModule: 19 5 inputs.flake-parts.mkFlake 20 6 { 21 7 inputs = ··· 33 19 { 34 20 imports = [ 35 21 newModule 36 - flakeModule 22 + ./flakeModule.nix 37 23 ]; 38 24 }; 39 - } 25 + 26 + flake = inputs.flake-parts.lib.mkFlake { inherit inputs; } ./flakeModule.nix; 27 + 28 + in 29 + flake // { __functor = functor; }
+1 -1
flake.nix
··· 16 16 treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; 17 17 }; 18 18 19 - outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } ./.; 19 + outputs = inputs: import ./. inputs; 20 20 }
+9
flakeModule.nix
··· 1 + { inputs, ... }: 2 + { 3 + systems = import inputs.systems; 4 + imports = [ 5 + ./perSystem-lib.nix 6 + ./tests.nix 7 + ./treefmt.nix 8 + ]; 9 + }