mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
ade1e59ce1
* Add cross-compilation for `lmdb`. * Got built caching working in CI with `cachix`. * Cache cross compilation dependencies and toolchains. * Do release builds in CI. * Upload release builds to `bootstrap.urbit.org` on successful build. * Lots of optimization work for CI. * Boot from a solid pill in CI and load arvo with `-A`. * Increase `vere` HTTP timeout to 15m.
27 lines
691 B
Nix
27 lines
691 B
Nix
# Some utility functions:
|
|
|
|
rec {
|
|
|
|
# The inverse of builtins.listToAttrs
|
|
attrsToList = o:
|
|
map (a: { name=a; value=builtins.getAttr a o; })
|
|
(builtins.attrNames o);
|
|
|
|
# ∀o,x,y. produce o' such that o'.y == o.x.y (assuming no conflicts)
|
|
flattenSet = o:
|
|
builtins.foldl' (acc: v: acc // v) {}
|
|
(builtins.attrValues o);
|
|
|
|
prefixSetAttrs = prefix: o:
|
|
builtins.listToAttrs
|
|
(map ({name, value}: { name=prefix + name; value=value; })
|
|
(attrsToList o));
|
|
|
|
# ∀o,x,y. produce o' such that o'.x-y == o.x.y
|
|
flattenSetPrefix = o:
|
|
(builtins.foldl' (acc: o: acc // o) {}
|
|
(map ({name, value}: prefixSetAttrs name value)
|
|
(attrsToList o)));
|
|
|
|
}
|