tvl-depot/nix
Profpatsch e4a7704583 feat(nix): add nix.tag, a way of discriminating via tagged unions
Introduces the concept of a “tag”, a single-keyed attrset which
annotates a nix value with a name.
This can be used to implement tagged unions (by implying the list of
possible tags is well-known), which has some overlap with how
`nix.yants` does it.

However, the more fascinating use-case is in concert with a
so-called discriminator, `match` and hylomorphisms.

The discriminator can take a nix value, and add tags to it based on
some predicate.
With `match`, we can then use that information to convert the
discriminated values again.
With `hylo`, we can combine both the “constructive” discriminator step
with the “destructive” match step to recursively walk over a nix data
structure (based on a description of how to recurse, e.g. through attrset
values or list values), and then apply a transformation in one go.

Change-Id: Ia335ca8b0881447fbbcb6bcd80f49feb835f1715
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2434
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-01-30 15:41:08 +00:00
..
binify refactor(nix): use our own writeScript(Bin) 2020-06-30 00:19:27 +00:00
bufCheck feat(ci): run buf check lint in CI 2020-07-17 22:55:13 +00:00
buildGo feat(tools/depot-scanner): init project 2020-08-20 03:05:40 +00:00
buildLisp fix(buildLisp): Override LANG in sbclWith for misconfigured machines 2020-11-08 18:35:28 +00:00
emptyDerivation feat(nix/emptyDerivation) add emptyDerivation 2020-06-28 17:59:46 +00:00
escapeExecline chore(OWNERS): move Profpatsch up to nix/ 2021-01-01 19:03:15 +00:00
getBins chore(OWNERS): move Profpatsch up to nix/ 2021-01-01 19:03:15 +00:00
mergePatch feat(nix): add mergePatch 2021-01-01 19:03:02 +00:00
readTree feat(nix/readTree): add tests of the traversal logic in README 2021-01-30 12:06:54 +00:00
runExecline feat(nix): add runExecline.local 2021-01-02 14:24:35 +00:00
runTestsuite feat(nix/runTestsuite): add assertThrows 2021-01-30 11:44:25 +00:00
tag feat(nix): add nix.tag, a way of discriminating via tagged unions 2021-01-30 15:41:08 +00:00
tailscale chore: Rename pkgs->depot in all Nix file headers 2020-02-21 13:54:53 +00:00
writeElispBin chore(writeElispBin): Move from //overrides to //nix 2020-12-01 12:55:59 +00:00
writeExecline chore(OWNERS): move Profpatsch up to nix/ 2021-01-01 19:03:15 +00:00
writeScript refactor(nix): use our own writeScript(Bin) 2020-06-30 00:19:27 +00:00
writeScriptBin refactor(nix): use our own writeScript(Bin) 2020-06-30 00:19:27 +00:00
yants feat(nix/yants): add restrict 2021-01-03 15:53:18 +00:00
OWNERS chore(OWNERS): move Profpatsch up to nix/ 2021-01-01 19:03:15 +00:00