about summary refs log tree commit diff
path: root/tools/nixery/manifest/manifest.go (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-02-22 r/7593 fix(nixery): strictly adhere to OCI image specMarkus Rudy1-2/+2
nixery.dev uses the vnd.docker.container.image.v1 format, which is recognized by the OCI [1] and originally defined by Docker [2]. The config field in this image format, which this commit is about, is even portable between the Docker and OCI formats (the Docker Golang library embeds the OCI definition [3]). The attribute names in what's called ImageConfig in [3] are specified as PascalCase, which effectively means that the names Env and Cmd used by nixery need to be capitalized. The lowercase variant is not causing a lot of issues because most container tooling is written in Golang, which allows case-insensitive matches when deserializing JSON. Languages that parse strictly either miss the configuration values, or fail due to unknown attributes. This commit capitalizes Cmd and Env to accomodate strict parsers. [1]: https://github.com/opencontainers/image-spec/blob/365fa41/media-types.md?plain=1#L70 [2]: https://github.com/moby/moby/blob/v20.10.8/image/spec/v1.2.md#image-json-description [3]: https://github.com/opencontainers/image-spec/blob/365fa41/specs-go/v1/config.go#L24 Change-Id: Ibee597a64d36c008dea83a3b7a0d8e59b8287d0d Signed-off-by: Markus Rudy <webmaster@burgerdev.de> Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> Reviewed-on: https://cl.tvl.fyi/c/depot/+/11012 Autosubmit: lukegb <lukegb@tvl.fyi> Reviewed-by: lukegb <lukegb@tvl.fyi> Tested-by: BuildkiteCI
2024-02-22 r/7592 chore(tazjin/nixos/laptop): timezone Bangkok->MoscowVincent Ambo1-1/+1
Change-Id: Ia1db8e8aa15128e7ec18fffe773377bce3192ea4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11011 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2024-02-21 r/7591 feat(tvix/eval): Store string context alongside dataAspen Smith9-79/+377
Previously, Nix strings were represented as a Box (within Value) pointing to a tuple of an optional context, and another Box pointing to the actual string allocation itself. This is pretty inefficient, both in terms of memory usage (we use 48 whole bytes for a None context!) and in terms of the extra indirection required to get at the actual data. It was necessary, however, because with native Rust DSTs if we had something like `struct NixString(Option<NixContext>, BStr)` we could only pass around *fat* pointers to that value (with the length in the pointer) and that'd make Value need to be bigger (which is a waste of both memory and cache space, since that memory would be unused for all other Values). Instead, this commit implements *manual* allocation of a packed string representation, with the length *in the allocation* as a field past the context. This requires a big old pile of unsafe Rust, but the payoff is clear: hello outpath time: [882.18 ms 897.16 ms 911.23 ms] change: [-15.143% -13.819% -12.500%] (p = 0.00 < 0.05) Performance has improved. Fortunately this change can be localized entirely within value/string.rs, since we were abstracting things out nicely. Change-Id: Ibf56dd16c9c503884f64facbb7f0ac596463efb6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10852 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: aspen <root@gws.fyi>
2024-02-21 r/7590 feat(nix/writeTree): don't require IfD for drvs in treesterni1-19/+11
As far as I can tell we can handle files and directories using the same cp(1) invocation, so we no longer need to potentially IfD derivations in the tree to figure out whether they are files or directories. Change-Id: Iabe648c30a747fa42768558715e388552024764a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10996 Reviewed-by: aspen <root@gws.fyi> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2024-02-21 r/7589 feat(nix/writeTree): initAspen Smith3-0/+145
Add //nix/writeTree, a function to make a derivation to build a directory structure from a Nix attribute set. Co-authored-by: sterni <sternenseemann@systemli.org> Change-Id: I9c0fc91611a55a20ad33de6f2b27abde4b6abd21 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10963 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: aspen <root@gws.fyi> Reviewed-by: aspen <root@gws.fyi>
2024-02-21 r/7588 revert(tvix): don't use Rc::clone explicitlyaspen4-9/+9
This reverts commit d9565a4d0af3bffd735a77aa6f1fd0ec0e03b14a. Reason for revert: this was intentional - putting Rc::clone instead of .clone is a common Rust idiom, and makes it explicit that we're cloning a shared reference, not an underlying resource Change-Id: I41a5f323ee35d7025dc7bb02f7d5d05d0051798d Reviewed-on: https://cl.tvl.fyi/c/depot/+/10995 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-02-21 r/7587 fix(tvix/eval): allow reading non-UTF8 filesFlorian Klink4-14/+14
With our values using bstr now, we're not restricted to only reading files that contain valid UTF-8. Update our `read_to_string` function to `read_to_end` (named like `std::io::Read::read_to_end`), and have it return a Vec<u8>. Change-Id: I87f0291dc855a132689576559c891d66c