gunk-dev/the-valley

cli.nix

sourceb8e46aa6aaccmain's published tip history
26.8 KiB
1# The valley command: that its help answers and its completions are
2# lint-clean, what its review verb anchors a note to, what its deriver makes of a policy and a diff, that
3# the-valley's own policy composes and names only checks that exist, what
4# its review verb publishes when it files an integration request, what it
5# walks with no change, what its
6# Go verbs' unit tests and the rebase engine's hold, what its ready and withdraw verbs write to a
7# change's record through the real push hook, what its knot verbs write to
8# the plan graph, what its plan verb shows of that graph, what its
9# self-update verb installs and what the home-manager module runs it with.
10{
11 pkgs,
12 lib,
13 self,
14 system,
15 packages,
16 hosts,
17 nixStandIns,
18 ...
19}:
20let
21 # A stand-in for git, sort or cue that fails one chosen call; see
22 # fail-nth.sh.
23 failNth = pkgs.writeShellScript "fail-nth" (builtins.readFile ./fail-nth.sh);
24
25 # The user units the home-manager module renders for a home with
26 # self-update on. The module is evaluated over stand-ins for the
27 # home-manager options it sets, because this flake has no home-manager.
28 selfUpdateUnits =
29 (lib.evalModules {
30 modules = [
31 self.homeManagerModules.valley
32 {
33 options = {
34 systemd.user.services = lib.mkOption { type = lib.types.attrsOf lib.types.anything; };
35 systemd.user.timers = lib.mkOption { type = lib.types.attrsOf lib.types.anything; };
36 home.homeDirectory = lib.mkOption { type = lib.types.str; };
37 home.username = lib.mkOption { type = lib.types.str; };
38 };
39 config = {
40 _module.args.pkgs = pkgs;
41 home.homeDirectory = "/home/someone";
42 home.username = "someone";
43 programs.valley.selfUpdate = {
44 enable = true;
45 repo = "git@valley-host:the-valley";
46 };
47 };
48 }
49 ];
50 }).config.systemd.user;
51
52 # Throwaway keys for valley-request's reuse scenarios, made once at build
53 # time: a check worker's and the operator's, which sign evidence, and the
54 # integrator's. They hold no authority anywhere. The protected host's
55 # hook, rendered with these as its known signers, admits evidence the
56 # worker and the operator sign.
57 reuseKeys =
58 pkgs.runCommand "valley-request-keys"
59 {
60 nativeBuildInputs = [
61 pkgs.openssh
62 packages.attest
63 ];
64 }
65 ''
66 mkdir $out
67 for who in worker operator integrator; do
68 ssh-keygen -q -t ed25519 -N "" -C "$who" -f "$out/$who"
69 done
70 {
71 attest key --key "$out/worker" --name worker.valley.invalid/attestations
72 attest key --key "$out/operator" --name operator.valley.invalid/attestations
73 } > "$out/hook_signers"
74 '';
75 reuseHost = hosts.protectedHost.extendModules {
76 modules = [
77 { services.valley.integrator.knownSignersFile = lib.mkForce "${reuseKeys}/hook_signers"; }
78 ];
79 };
80
81 # The integrator host with the operator valley-walk approves as holding
82 # the approve grant, so its hook takes the requests the walk files.
83 walkHost = hosts.integratorHost.extendModules {
84 modules = [ { services.valley.grants.approve = [ "alice" ]; } ];
85 };
86in
87{
88 # The CLI's help verb answers without a repo or a remote, for every verb
89 # the usage lists. The completions are lint-clean, complete every verb,
90 # and the installed package carries them at the auto-linked paths.
91 valley-cli = pkgs.runCommand "valley-cli" {
92 nativeBuildInputs = [
93 pkgs.git
94 pkgs.shellcheck
95 pkgs.zsh
96 packages.valley
97 ];
98 bashCompletion = ../../completions/valley.bash;
99 zshCompletion = ../../completions/_valley;
100 valley = packages.valley;
101 } (builtins.readFile ./valley-cli.sh);
102
103 # review's notes: the anchors are the whole claim, so they are
104 # pinned here rather than left to the reader of status/. The
105 # session is real — a pty, real less, a pager filter that
106 # restructures the diff, and an $EDITOR that inserts lines while
107 # the pager is open — because every property under test is a
108 # property of that arrangement: that v is handed the raw buffer
109 # and not the rendering, that an inserted line becomes a note,
110 # and that the file and line it names are the ones it sat on. It goes
111 # on to review a stack layer by layer, and a stale stack: approving its
112 # top refused, its bottom approved, and review's [b]ase before the first
113 # page, after which the pages and the request are at the rebased heads,
114 # the layer approved before the rebase is printed as rebased with the
115 # same file changes instead of paged, and a note written in the whole
116 # diff viewed before the rebase is printed once, under the top. Last, a
117 # note written beside an edited line of a version paged as edited since
118 # its approval keeps its file and line, through a structure-preserving
119 # renderer and through less, whose views are styled while the buffer the
120 # editor opens is plain. Ctrl-C with the pager open, and SIGTERM at the
121 # prompt, end the review with status 130 and nothing of its own left in
122 # its TMPDIR.
123 review-notes = pkgs.runCommand "valley-review-notes" {
124 nativeBuildInputs = [
125 pkgs.git
126 pkgs.less
127 pkgs.util-linux # script(1), for the pty less insists on
128 packages.valley-unstamped
129 ];
130 # The reviewer, as a script: five insertions and one edit of a
131 # line that was already there. The edit is deliberately far
132 # from every insertion, since -U0 would otherwise merge them
133 # into one hunk and the note would be dropped with it.
134 reviewer = pkgs.writeShellScript "valley-review-notes-editor" (
135 builtins.readFile ./review-notes-editor.sh
136 );
137 } (builtins.readFile ./review-notes.sh);
138
139 # The verification-policy deriver (dcr-f41f718), through `valley checks`.
140 # Composing the two layers is CUE's job and is pinned by cue-vet; a path
141 # matcher is wrong exactly at the glob boundaries — `*` inside one
142 # segment against `**` across segments, `**` matching no segment at all
143 # — and at the sides of a diff a naive reader drops: a rename's old path
144 # and a deletion. Each is pinned by driving the verb over a scratch
145 # repository and the scratch policy in examples/policy/deriver/, whose
146 # floor is one glob boundary per class. A check's cost is pinned the same
147 # way: marking a check slow moves it between the summary lines and the
148 # --cost lists, and changes nothing required. So is the carry mode:
149 # overlapping classes, and paths in different classes, report the
150 # strictest of their modes, and an unclassified path is same-paths. A
151 # mode written by refining `policy` counts.
152 #
153 # And the deriver fails closed: failNth stands in for git and cue, and
154 # fails each call the derivation makes in turn.
155 # Every failure must end the derivation with nothing on stdout, because
156 # a failure read as an empty list is a change that requires nothing. The
157 # check runs the raw binary for that, because the package's wrapper puts
158 # its own git ahead of anything on PATH.
159 policy-deriver = pkgs.runCommand "valley-policy-deriver" {
160 nativeBuildInputs = [
161 pkgs.git
162 pkgs.cue
163 packages.valley-unstamped
164 ];
165 valleyUnwrapped = lib.getExe packages.valley-unwrapped;
166 fixtures = ../../examples/policy/deriver;
167 schema = ../../schema/verification.cue;
168 inherit failNth;
169 } (builtins.readFile ./policy-deriver.sh);
170
171 # the-valley's own project layer (policy/project), which is what gates
172 # every change to this repository. A layer that stopped composing would
173 # stop every derivation once it landed, the derivation of its own fix
174 # included, so it is held here before it lands. The floor it is composed
175 # with is the example one: the owning valley's is not in this tree. The
176 # check also holds every check the layer names to being an attribute of
177 # this flake's checks, and holds a docs-only change to requiring
178 # prose-format alone. And it holds a check's own files to requiring
179 # that check: every file in this directory named after a check, and every
180 # other script here, read from the directory itself so a new one is
181 # held as soon as it is added. It holds each scope to its carry mode,
182 # the scopes the carry classes classify to every check they required
183 # before, and the restacker's cap to the default.
184 own-policy = pkgs.runCommand "valley-own-policy" {
185 nativeBuildInputs = [
186 pkgs.git
187 pkgs.cue
188 packages.valley-unstamped
189 ];
190 schema = ../../schema/verification.cue;
191 project = ../../policy/project;
192 floor = ../../examples/policy/instance/floor-format.cue;
193 template = ../../examples/policy/instance/template-docs.cue;
194 checkNames = builtins.attrNames self.checks.${system};
195 checkFiles = builtins.attrNames (builtins.readDir ./.);
196 } (builtins.readFile ./own-policy.sh);
197
198 # review's [a]pprove and the approve and rebase verbs, driven end to end
199 # over scratch repositories: a branch reviewed, the request filed, and
200 # what the receiving side then holds. The claim is about sequencing, so
201 # it is only observable from there — the bare repo logs every push it
202 # receives, and the check reads that log to see that ONE of them carried
203 # the evidence and the request together. A change whose version names no
204 # branch is approved at its recorded head the same way. Every check the scratch policy
205 # declares uses the command runner, for the reason attest-e2e gives: a
206 # nix build has no daemon. The packaged CLI carries its own schema, so
207 # the scratch projects that stand for projects other than the-valley
208 # carry no schema/. valleyUnwrapped is the raw binary, which nothing
209 # gives a schema: run in a the-valley checkout, it reads the schema there.
210 #
211 # Last, evidence a check worker already published, over a second origin
212 # that runs the protected host's rendered hook and a project whose two
213 # checks use the nix runner, through integrator-e2e's stand-in for nix.
214 # Its owning valley publishes the signers clients verify with. Evidence
215 # for every required check is reused: approve runs no nix, needs no
216 # signing key, and pushes the request alone, and approving that head
217 # again pushes nothing. Evidence for one check is reused and the other is
218 # not: the worker's note for it names another flake attribute. approve,
219 # and review's [a]pprove, file the request at once without --build-here,
220 # build nothing, publish no evidence, and name that nix check as missing.
221 # With --build-here it runs, the operator's evidence goes in one push
222 # with the request, and the real integrator lands it on the two signers'
223 # evidence. Origin
224 # holding the operator's own ref for a tree, without the check still
225 # missing, is refused before anything runs (bd-7b7d58f). A listing or a
226 # fetch of origin's evidence that fails is refused, and nothing runs or
227 # is published. A request filed while a fully covered approval is
228 # prepared wins the lease. Then evidence approve must not reuse, each
229 # judged by approve and by the real integrator from the same refs: a
230 # worker the host has revoked and a local known-signers file still
231 # trusts, a local file that trusts less than the host, a failure and an
232 # observation that sit before a pass in ref order, a note without its
233 # last newline, a signer nobody knows, a note about another tree, an
234 # expired observation, and a note for another flake attribute. Notes the
235 # hook would refuse are planted past it. Then the host publishes a
236 # signer projects file, and each integrator pass is given it: a note
237 # whose only signer counts in another project is not reused, the
238 # integrator does not accept it, and review --build-here builds that
239 # check; the same note countersigned by the integrator is not reused
240 # either; a published list that does not read, or is no file, reuses
241 # nothing; and a note
242 # from a signer restricted to this project is reused and lands. A change
243 # whose only uncovered check is a command check runs it without
244 # --build-here, and lands. A change missing a nix check and a command
245 # check runs the command check alone, and files with its evidence.
246 #
247 # Then the check worker, as packaged, over the same origin and ready
248 # changes, with its key restricted to the project: it builds a change's nix checks and publishes the evidence
249 # before any request exists, and approve then reuses all of it with no
250 # key and the integrator lands it. Two passes at once take turns, and the
251 # second builds nothing. A failed batch waits 15 minutes, then twice as
252 # long, by VALLEY_NOW, and its record is gone once it passes. A push whose
253 # reply is lost, landed or not, is never built again: the next pass finds
254 # it on origin, or pushes the ref the first pass stored. A head
255 # superseded while it is built still has its evidence published, and the
256 # new version is built next. Origin holding the worker's own ref without a
257 # required check is reported and nothing is built. approve files the
258 # request without it, the integrator holds that request as stale, and
259 # approve --build-here builds the rest, which lands. An origin the pass cannot read stops it before it builds. On the
260 # real clock, a failed batch's wait runs from when the batch ended. A
261 # failed push waits a minute, then two, by the object it publishes, so
262 # two changes holding one tree try one push. A pass over another project
263 # keeps this project's waits. A pass killed mid-batch leaves attest
264 # holding the lock, so the next pass waits for it, then publishes what
265 # it stored. A tag in the cache clone named like the worker's own ref is
266 # not taken for evidence an earlier pass stored. A cache clone whose
267 # making was interrupted by git dying with its config.lock held is made
268 # again, and a half-made clone with a stale config.lock in the cache's
269 # place is set aside and made again.
270 #
271 # Last, approve reads each ref by its exact name. A branch on origin
272 # named like a missing request stops the push, and once it is deleted
273 # the request is filed. A tag named like the remote-tracking ref of a
274 # branch origin lacks, or of a main origin lacks, and an owning valley
275 # with no main each refuse the approval, and nothing is filed.
276 valley-request = pkgs.runCommand "valley-request" {
277 nativeBuildInputs = [
278 pkgs.git
279 pkgs.cue
280 pkgs.jq # the timing log's lines
281 pkgs.openssh
282 pkgs.util-linux # setsid, to stop an approval as ctrl-C does
283 packages.attest
284 packages.valley-unstamped
285 packages.valley-worker
286 packages.integrator
287 ];
288 schemaFile = ../../schema/verification.cue;
289 valleyUnwrapped = lib.getExe packages.valley-unwrapped;
290 inherit failNth reuseKeys;
291 reuseInitScript = reuseHost.config.systemd.services.valley-init.script;
292 passAsFile = [ "reuseInitScript" ];
293 integratorE2e = nixStandIns;
294 attestSchema = ../../schema/attestation.cue;
295 eventSchema = ../../schema/events.cue;
296 } (builtins.readFile ./valley-request.sh);
297
298 # The rebase engine's tests (rebase/), run with go vet: a chain, a
299 # shared lower layer, a conflict, an empty layer, a lease lost to a moved
300 # branch, a record append refused after the branches moved, a branch
301 # push and a record push that origin takes and never acknowledges, a
302 # cancellation before the push, and a cancellation while a hook or a
303 # filter blocks, each over real repositories and real pushes. A restack
304 # append kept and restored still reads the branch
305 # before its push, and is refused once the owner has moved it; a kept
306 # write that is malformed does not restore. If a snapshot fetch fails
307 # because main was rewritten and pruned after listing refs, ReadSnapshot
308 # lists origin and fetches again, up to three attempts in total.
309 # valley-ready and integrator-e2e drive it through valley rebase.
310 rebase-unit = packages.rebase.unit;
311
312 # The valley command's tests (status/), in its unit build: how the
313 # command line dispatches, its help topics and the stamp, the outcome
314 # records status accepts, the names its JSON refuses, its shell
315 # quoting held to bash's, a rebase ended by a SIGTERM
316 # while a hook blocks it, where review anchors a note in a renamed file
317 # and in a diff of a diff, and the valley-checks/v1 document checks prints
318 # over a real repository, a path that is not UTF-8 in base64. valley-status
319 # and valley-ready drive the verbs through the CLI over real repositories.
320 # It keeps the name policies require it by.
321 valley-go-unit = packages.valley-unwrapped.unit;
322
323 # Read origin's request/outcome refs and distinguish a pending request,
324 # a recorded decision and a landing, without moving the user's checkout.
325 # Each state is read again through --json, and jq holds the object to
326 # the valley-status/v1 contract. A change's restack report is shown as
327 # current, and as historical once a ref it observed has changed: its
328 # branch, main, its record, a branch it saw missing, or a request that
329 # held it back. Status, changes and pending all show it.
330 valley-status = pkgs.runCommand "valley-status" {
331 nativeBuildInputs = [
332 pkgs.git
333 pkgs.jq
334 packages.valley-unstamped
335 ];
336 } (builtins.readFile ./valley-status.sh);
337
338 # ready, unready and withdraw, through real pushes to a bare repo wired
339 # with the rendered pre-receive hook, as each principal: a change created
340 # at v1, a second version, the same head refused, a withdrawal, revived
341 # at the same version and then at a new one, a principal that neither
342 # owns the change nor holds the request grant refused by the hook, and
343 # the operator, who holds it, let through. Then each source of a change's ID — the jj
344 # header, the Change-Id trailer, a generated ID, --stamp — a header and a
345 # trailer that disagree, and a change whose commits hold a merge. Last, a
346 # change named by its handle is approved, reviewed and rebased at the head
347 # its record names: a record pushed with its branch moved elsewhere in the
348 # same push is refused, the branch at the recorded head is filed at that
349 # head, and a later version whose branch is elsewhere is refused. A
350 # version that names no branch is approved at its head, and refused by
351 # review and rebase, which act on a branch. A name no record is on that
352 # is no branch name is refused. Then a
353 # draft: unready, ready again at the same head and at a new one, listed
354 # apart by pending, refused by approve and rebase, and shown by review
355 # as a draft, with neither [a]pprove nor [r]eject offered,
356 # whether it is named by its handle or its branch, and a request pending
357 # under either name warned of by unready and withdraw, a request for an
358 # earlier version's branch too. review shows a withdrawn change the same
359 # way. A change behind main is asked the ordinary prompt under a line
360 # that says so, with no [b]ase, and is approved as it is. A review left
361 # open while another principal unreadies the change, or readies a new
362 # version, says so in one line and acts on nothing. A branch no record is
363 # on is acted on as a branch, and one two records are on is refused.
364 # Last, stacks rebased whole: every layer moved and each change given a
365 # version, by ancestry and by trees; a
366 # conflict in the middle layer; each refusal before the rebase; a branch
367 # moved, and a plain branch readied, after the rebase read the stack; a
368 # change unreadied between the branch push and its record write, and the
369 # command the manifest gives to finish it; and a second stack left on an
370 # old head. review of a stack whose middle layer is a draft, then
371 # withdrawn, offers [a]pprove under it and neither at it nor above it.
372 # Then review set against a change's approved version: a clean
373 # restack after a rebase, with the landing between the bases listed and no
374 # diff paged; a later version with an edited file, paged with what it
375 # changes beyond the approved version carried onto main, and no
376 # range-diff; a version whose message
377 # alone changed and one whose author alone did, each flagged; a change
378 # with no approved version, paged in full; and a stack whose lower layer
379 # is set against its own approval while its top, which has none, is
380 # paged. The hook is followed from the protected host's rendered init
381 # script, so the rules the record meets are the ones a host applies.
382 valley-ready = pkgs.runCommand "valley-ready" {
383 nativeBuildInputs = [
384 pkgs.git
385 pkgs.jq
386 pkgs.util-linux # script(1), for approve's confirmation on a terminal
387 packages.valley-unstamped
388 ];
389 initScript = hosts.protectedHost.config.systemd.services.valley-init.script;
390 passAsFile = [ "initScript" ];
391 } (builtins.readFile ./valley-ready.sh);
392
393 # valley changes and valley pending over the projects of one test host,
394 # made by the integrator host's rendered valley-init, so discovery reads
395 # the project list a host publishes and every record goes through the
396 # hook it installs. Two repositories with ready, draft and withdrawn
397 # records; handles unique across them; one listed repository that cannot
398 # be read; a change ID recorded in several, with qualified handles; --repo;
399 # a version landed by fast-forward, one landed as a new commit with a
400 # transfer statement the integrator signed, one consumed with no
401 # evidence, one whose statement another key signed, one with a landed
402 # version's tree on another parent, a landing's tree replayed on a later
403 # main, and heads below a merge that dropped them, through either
404 # parent; a project named origin that shares a change ID; a
405 # policy/valley git would read as an option or
406 # as ext::; includes as the nearest ancestor only; pending's human shape,
407 # its drafts array and --checks; and a branch name read as a branch again
408 # once its change has landed, before the branch moves and after.
409 valley-changes = pkgs.runCommand "valley-changes" {
410 nativeBuildInputs = [
411 pkgs.git
412 pkgs.jq
413 pkgs.openssh
414 packages.valley-unstamped
415 packages.attest
416 ];
417 initScript = hosts.integratorHost.config.systemd.services.valley-init.script;
418 passAsFile = [ "initScript" ];
419 # The floor --checks derives under.
420 floor = ../../examples/policy/instance;
421 } (builtins.readFile ./valley-changes.sh);
422
423 # valley review with no change, walking what needs the operator across
424 # the projects of the test host valley-changes makes: three ready changes
425 # in two projects, the other project's read through the walk's cache
426 # clone, approved, rejected and skipped there; a stale stack in that
427 # clone based with [b]ase; changes unreadied and readied at a new version
428 # while the walk is under way; Ctrl-C at a prompt on a terminal; a
429 # project that does not read; and an empty queue. Then two steps in the
430 # two repositories with their answers from one file, each step's pager
431 # run in its own repository and environment; a step that fails, after
432 # which the walk goes on; SIGTERM to the walk at a step's prompt; Ctrl-C
433 # in a step's pager; and Ctrl-C during a step's approval checks. It runs
434 # the packaged CLI, so the verification schema is the package's.
435 valley-walk = pkgs.runCommand "valley-walk" {
436 nativeBuildInputs = [
437 pkgs.git
438 pkgs.less
439 pkgs.openssh # ssh-keygen, for the key an approval's checks sign with
440 pkgs.util-linux # script(1), for Ctrl-C on a terminal
441 packages.valley-unstamped
442 ];
443 initScript = walkHost.config.systemd.services.valley-init.script;
444 passAsFile = [ "initScript" ];
445 floor = ../../examples/policy/instance;
446 } (builtins.readFile ./valley-walk.sh);
447
448 # valley knot against local bare repositories that run no hook, as any
449 # git remote would: every verb, the ref's shape after each write, a
450 # comment's edits read back through log and show --at, another
451 # project named by --project and by a qualified id, and then each way a
452 # write may fail to land the first time. A stand-in for git, first on
453 # PATH, makes another writer land between a read and its push, drops the
454 # connection after a push lands and after one that did not, takes a
455 # claim, changes a field or edits a comment first, and releases and
456 # retakes a claim an unclaim read. Each write must then land exactly
457 # once, or be reported as a conflict. Two writers also run at once. valley
458 # is the raw binary, because the package's wrapper puts its own git ahead
459 # of the stand-in.
460 valley-knot = pkgs.runCommand "valley-knot" {
461 nativeBuildInputs = [
462 pkgs.git
463 pkgs.jq
464 packages.valley-unwrapped
465 ];
466 } (builtins.readFile ./valley-knot.sh);
467
468 # valley plan against local bare repositories that run no hook: a graph
469 # built with the real knot verbs, each at a time VALLEY_NOW fixes, so
470 # every date and age it shows is the same on every run. The text, off a
471 # terminal, and the valley-plan/v1 document are compared with golden
472 # files kept beside the code that prints them (status/testdata/plan/).
473 # Then a project with no graph, --all over the projects the instance
474 # publishes with one that cannot be read, and the operator named by
475 # --owner and by no one. valley is the raw binary, as for valley-knot.
476 valley-plan = pkgs.runCommand "valley-plan" {
477 nativeBuildInputs = [
478 pkgs.git
479 pkgs.jq
480 pkgs.gawk
481 pkgs.diffutils
482 packages.valley-unwrapped
483 ];
484 golden = ../../status/testdata/plan;
485 } (builtins.readFile ./valley-plan.sh);
486
487 # Self-update's own tests (selfupdate/), run with go vet: a real bare
488 # repository for ls-remote and a stand-in for nix, over an install, an
489 # up-to-date run, each step of the smoke test failing and being skipped,
490 # --retry, a rollback and its return, a pin, a valley removed from the
491 # profile by hand, and the repositories and branches it refuses.
492 # valley-self-update drives the verb through the CLI.
493 selfupdate-unit = packages.selfupdate.unit;
494
495 # valley --version and valley self-update through the installed package,
496 # against a real bare repository. A build has no nix, so a stand-in for
497 # nix builds a commit as a valley that runs the real, unstamped package
498 # under the stamp nix would give that commit, beside the package's own
499 # share/. The smoke test therefore runs the real CLI over the policy the
500 # package ships, under the schema it carries. A run installs main's tip;
501 # the next finds it up to date, also from a repository whose own git
502 # config names another; a commit whose build cannot compose a policy
503 # fails the smoke test, installs nothing, and is skipped. Then the
504 # home-manager module, evaluated over stand-ins for the home-manager
505 # options it sets: its timer, its service's PATH, and the arguments its
506 # script runs valley with. A real nix build into a throwaway profile
507 # needs a nix daemon and a writable store, which a build does not have.
508 valley-self-update = pkgs.runCommand "valley-self-update" {
509 nativeBuildInputs = [
510 pkgs.git
511 pkgs.jq
512 packages.valley
513 ];
514 inherit (packages.valley) version;
515 valley = packages.valley;
516 valleyUnstamped = packages.valley-unstamped;
517 units = builtins.toJSON selfUpdateUnits;
518 passAsFile = [ "units" ];
519 } (builtins.readFile ./valley-self-update.sh);
520}