gunk-dev/the-valley

identity.nix

source4cf069f09fc8main's published tip history
1.2 KiB
1# The identity registry compiler, driven end to end. What it renders is
2# checkable against something already written down: the known-signers file
3# the instance maintains by hand today is exactly what the registry must
4# compile to, so the golden case is a byte-for-byte comparison against the
5# artifact this compiler exists to replace.
6#
7# The schema's own rejections live with the other schemas, in schema.nix.
8{ pkgs, packages, ... }:
9{
10 identity-e2e = pkgs.runCommand "valley-identity-e2e" {
11 nativeBuildInputs = [
12 pkgs.git
13 pkgs.openssh
14 packages.identity
15 # attest, so the compiled verifier line is checked against the
16 # implementation that reads it and not only against a fixed vector.
17 packages.attest
18 ];
19 registry = ../../examples/identity/registry;
20 compiled = ../../examples/identity/compiled;
21 expired = ../../examples/identity/expired;
22 # The fail-safe case. Any invalid registry would do; this one fails on a
23 # property of the floor rather than on a typo, so the check also
24 # observes that a floor violation is what stops a compilation.
25 invalid = ../../examples/identity/rejected/external-governs-registry.cue;
26 } (builtins.readFile ./identity-e2e.sh);
27}