| 1 | # The plan graph's module (knot/): its own tests, and its validator held to |
| 2 | # the CUE schema and the knowledge lint on every rule the two share. What |
| 3 | # the CLI does with it is valley-knot's, in cli.nix. |
| 4 | { |
| 5 | pkgs, |
| 6 | packages, |
| 7 | ... |
| 8 | }: |
| 9 | { |
| 10 | # The canonical form's parser, cycles, transitions and every limit at |
| 11 | # its edge, run in the package's checkPhase. |
| 12 | knot-unit = packages.knot; |
| 13 | |
| 14 | # The Go validator is the authority for refs/the-valley/knots, and |
| 15 | # schema/node.cue with nix/knowledge-lint.py is the one documented schema |
| 16 | # the archive shares. Both are run over the shared fixtures and over |
| 17 | # graphs generated from a fixed seed, and any graph on which either |
| 18 | # verdict differs from the case's fails the check. The lint and the |
| 19 | # schema are the same store paths lib.knowledgeLint uses. |
| 20 | knot-agree = pkgs.runCommand "valley-knot-agree" { |
| 21 | nativeBuildInputs = [ |
| 22 | pkgs.cue |
| 23 | pkgs.python3 |
| 24 | packages.knot |
| 25 | ]; |
| 26 | lint = ../knowledge-lint.py; |
| 27 | nodeSchema = ../../schema/node.cue; |
| 28 | } (builtins.readFile ./knot-agree.sh); |
| 29 | } |