tangled
alpha
login
or
join now
oeiuwq.com
/
checkmate
0
fork
atom
A flake checker (treefmt & nix-unit) for testing other flakes with zero dependencies.
0
fork
atom
overview
issues
pulls
pipelines
Expose as functor
oeiuwq.com
1 year ago
68f4c59a
2ce223b9
+19
-20
3 changed files
expand all
collapse all
unified
split
default.nix
flake.nix
flakeModule.nix
+9
-19
default.nix
···
1
1
-
{ inputs, ... }:
1
1
+
inputs:
2
2
let
3
3
-
flakeModule = {
4
4
-
systems = import inputs.systems;
5
5
-
imports = [
6
6
-
inputs.flake-parts.flakeModules.flakeModules
7
7
-
./perSystem-lib.nix
8
8
-
./tests.nix
9
9
-
./treefmt.nix
10
10
-
];
11
11
-
};
12
12
-
in
13
13
-
{
14
14
-
imports = [ flakeModule ];
15
15
-
flake.flakeModules.default = flakeModule;
16
16
-
17
17
-
flake.lib.mkFlake =
18
18
-
newInputs: newModule:
3
3
+
functor =
4
4
+
_: newInputs: newModule:
19
5
inputs.flake-parts.mkFlake
20
6
{
21
7
inputs =
···
33
19
{
34
20
imports = [
35
21
newModule
36
36
-
flakeModule
22
22
+
./flakeModule.nix
37
23
];
38
24
};
39
39
-
}
25
25
+
26
26
+
flake = inputs.flake-parts.lib.mkFlake { inherit inputs; } ./flakeModule.nix;
27
27
+
28
28
+
in
29
29
+
flake // { __functor = functor; }
+1
-1
flake.nix
···
16
16
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
17
17
};
18
18
19
19
-
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } ./.;
19
19
+
outputs = inputs: import ./. inputs;
20
20
}
+9
flakeModule.nix
···
1
1
+
{ inputs, ... }:
2
2
+
{
3
3
+
systems = import inputs.systems;
4
4
+
imports = [
5
5
+
./perSystem-lib.nix
6
6
+
./tests.nix
7
7
+
./treefmt.nix
8
8
+
];
9
9
+
}