about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2023-08-20 r/6499 refactor(tvix/nix_cli): cargo clippyFlorian Klink1-4/+4
Change-Id: Ib48063660432bea9de2fc9aff5914ef76db3ad64 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9095 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-08-20 r/6498 refactor(tvix/cli): cargo clippyFlorian Klink2-2/+1
Change-Id: I723bc9b29733f5ee4e3094b92696fbdeb4b15a33 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9094 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-08-20 r/6497 refactor(tvix/serde): cargo clippyFlorian Klink3-14/+13
Change-Id: I3c86225040a04c9cb5702b226b4a5008ae219c42 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9093 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-08-20 r/6496 refactor(tvix/cli): stop parsing NixHash twiceFlorian Klink1-6/+2
We already have the parsed output_hash from above, no need to construct it again. Change-Id: Ie6d924ab446137c25c29fbeaf671aa7e5418262d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9110 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-08-20 r/6495 fix(tvix/nix-compat): disallow empty derivation namesRyan Lahfa1-0/+10
Yes: ``` $ nix-build -E 'derivation { name = ""; builder = "/bin/sh"; system = "x86_64-linux"; }' error: store path 'nr7i5pf18hw2zg487vkdyrbasdqylfcj-' has an empty name ``` Change-Id: I552f9ed1c1fe3bfceca18ca9b8e13d4b06dc6ff7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9108 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-08-20 r/6494 feat(tvix/nix-compat): don't swallow hash validation errorsRyan Lahfa3-58/+208
Previously, Output deserialization would silence validation errors and provide `None` for `hash_with_mode` as soon as a validation error would happen inside of the `NixHashWithMode` deserialization, e.g. invalid hash length would not provide an validation error but a silent `None` value. This is problematic, we workaround a serde limitation here by writing our own Deserializer. As you can see, we write some boilerplate code unfortunately, as, for example: - `#[serde(fail_if_unparsed_as="Option::is_none")]` is not a thing, otherwise, we could have been able to just bubble up errors in case of "not fully parsed" (and not missing) values. - `From<&serde_json::Value> for serde::de::Unexpected` is not a thing, otherwise, we could just map invalid type errors and reuse the existing types instead of doing extremely bizarre things with `serde::de::Unexpected::Other`, note: this is a not problem for expected, we know what we expect, we don't know what we received in practice. I decided to write a `NixHashWithMode::from_map` which will eat a map deserialized via `serde_json`, so our serde magic is not totally "data model" agnostic. I wanted to go for data model agnosticity and enable maximal performance, e.g. building the structure as the map values are streamed in the Visitor, this is needlessly painful because `Output` and `NixHashWithMode` are in different files and this really makes sense only if we write the full implementation in one file, indeed, otherwise, you end up duplicating the work or having strange coupling. So, for now, we will allocate a full map of the fields inside the `Output`, i.e. if any "unknown field" is in that map, we will deserialize it for no reason. Doing it properly, as I repeat it in the code and to flokli at C3Camp 2023, requires to patch serde upstream IMHO. Change-Id: I46fe6ccb8c390c48d6934fd3e3f02a0dfe59557b Reviewed-on: https://cl.tvl.fyi/c/depot/+/9107 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-08-19 r/6493 refactor(tvix): drop rust-analyzer from rust-docs build inputsFlorian Klink1-1/+0
We don't need rust-analyzer to run cargo doc. Change-Id: I5e2fd559e4045cadeab24b438c28d6df7f1d5d5f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9092 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2023-08-19 r/6492 docs(tvix): update commentFlorian Klink1-3/+1
cl/8306 fixed building all docs, but we forgot to update the comment. Change-Id: I17829612f13e7357bd0efe8223cc28ed0f6cdea2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9091 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-08-19 r/6491 refactor(tvix/nix-compat/derivation): cargo clippyFlorian Klink1-3/+2
This `.into_iter()` call is equivalent to `.iter()` and will not consume the `BTreeMap`. Change-Id: Ie26637ebecb0bea5b09c447cc45ed207f8b50913 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9088 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-08-19 r/6490 docs(tvix/nix-compat/store_path): fix broken docstr referenceFlorian Klink1-2/+2
Change-Id: Ie95ac265f8707e138c6a7b529760650d211f259d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9087 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-08-19 r/6489 refactor(tvix/nix-compat/nixhash): use shorthand struct initFlorian Klink1-1/+1
Change-Id: I1e52b752408a70fdb27e3e5c6f3bef5417b3e922 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9085 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2023-08-19 r/6488 docs(tvix/nix-compat): remove disambiguityFlorian Klink2-3/+3
Don't import thiserror::Error directly, so rustdoc knows what `crate::store_path::Error` we're talking about. Change-Id: I755c9377521a6833e9a77cb1a41b48edafb31fe0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9086 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-08-19 r/6487 refactor(tvix/nix-compat/derivation/escape): move to Vec<u8>Florian Klink2-7/+7
We only need bstr::ByteSlice to be able to use replace, it doesn't need to return a BString. Change-Id: I811948436fb89652e880970c2c05356183f3e439 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9084 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-08-17 r/6486 feat(grfn/system): Use fancy unicode chars in psqlAspen Smith1-0/+7
Change-Id: I3abb97a2f101fbf813736e48fa86b51ca2dbe931 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9083 Autosubmit: grfn <grfn@gws.fyi> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2023-08-17 r/6485 chore(grfn/home): Use stable emacsAspen Smith1-1/+1
I don't really need anything from unstable emacs atm, and it's... unstable. Change-Id: Ibd30f9f767e374c7e9fc125c494c414fd26815a7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9082 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Autosubmit: grfn <grfn@gws.fyi>
2023-08-17 r/6484 fix(grfn/emacs): Work around doom bugAspen Smith1-0/+2
Apparently this needs to be forward-declared now... Change-Id: I71857f38ab168751fb9926da8e74004c20729d60 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9081 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi>
2023-08-14 r/6483 chore(tvix/cli): delete unused NixCompatIO codesterni2-122/+0
Change-Id: Icb91b102208fea512e04383ce9d65b0681af18ab Reviewed-on: https://cl.tvl.fyi/c/depot/+/9079 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-08-13 r/6482 fix(tvix/eval): fix a comment position in value::jsonVincent Ambo1-2/+2
Change-Id: Ic58653254b36694f1991a18db9ceea0d532c2e31 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9068 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-08-13 r/6481 feat(users/Profpatsch): add my xmonad configProfpatsch6-0/+221
Change-Id: I41d7c3029990f5f1ae56a767331781b38e69997c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9077 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-08-11 r/6480 test(tvix/eval): check truncation direction of builtins.divsterni2-1/+24
builtins.div ought to truncate towards zero so that -(builtins.div a b) == builtins.div (-a) b -(builtins.div a b) == builtins.div a (-b) Change-Id: I8b7c08cd7f4fa8a1363c786d42c8d484f6cd133d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9006 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-08-09 r/6479 refactor(nix/sterni/int): rename div & mod to quot & remsterni2-23/+28
This mirrors the terminology Haskell uses: quot and rem truncate towards zero which is also the case for builtins.div. We can give us the option to introduce Haskell-style int.div and int.mod (to complete the confusion) which would truncate towards negative infinity. Change-Id: Ibebb0a01a73c9718cd62121b2fc2a19c3a4be0de Reviewed-on: https://cl.tvl.fyi/c/depot/+/9009 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2023-08-09 r/6478 feat(sterni/nix): add trivial float librarysterni3-0/+73
Only implements the different conversion types from and to ints for now. Unfortunately very reliant on builtins.{floor,ceil} which can't be implemented purely except very inefficiently (to my knowledge), so it only really works for C++ Nix >= 2.4. Tests are thus skipped for C++ Nix 2.3. Change-Id: Idcb1a11df11e214cdba3f2a0715472b370daa7dc Reviewed-on: https://cl.tvl.fyi/c/depot/+/9008 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2023-08-09 r/6477 refactor(users/sterni/nix): move generic number operation into numsterni6-45/+64
We omit type checks for performance reasons in most places currently, so the library grouping is important in showing people what to use for what sort of input. The moved functions make sense to use with floats as well, so we'll move them to the num library. Some of the remaining functions could theoretically be adapted and moved, but aren't for now. Change-Id: Ifdecaa60be594f4438b2a58b9ea6445e2da080e3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9007 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2023-08-09 r/6476 chore(users/sterni/emacs): use Emacs 29 instead of unstablesterni1-2/+1
This means we can subtitute the base package for my emacs derivation instead of compiling it from scratch (which is quite slow). This means I'll be using 29.1-rc1 until https://github.com/NixOS/nixpkgs/pull/246203 or https://github.com/NixOS/nixpkgs/pull/247496 are merged which is okay, as it includes pgtk support. Change-Id: Ie7cfec1ca0df9974c049be0b00d75f32143ac905 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9065 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2023-08-08 r/6475 chore(3p/sources): Bump channels & overlaysVincent Ambo10-88/+114
* web/pwcrypt: bump wasm-bindgen * corp/tvixbolt: bump wasm-bindgen * corp/rih/frontend: bump wasm-bindgen * corp/predlozhnik: bump wasm-bindgen * 3p/overlays: set hiPrio on nixpkgs-review package There is some upstream bug causing a conflict with the ZSH completion files generated by home-manager. Change-Id: Ibe5de5564d3214d48469abe175cbebe5356acf74 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9046 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2023-08-08 r/6474 docs(3p/ddclient): add TODO-comment for eventually cleaning this upVincent Ambo1-0/+5
Change-Id: Id02e9e69890d00dedafa1700a1ea98dd68767c1d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9045 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
2023-08-08 r/6473 chore(3p/sources): Bump channels & overlayssterni7-32/+324
* //users/grfn: vendor ddclient module and package into depot //3p/ddclient now contains the removed package expression and NixOS module with the following changes: - Include former uid/gid settings from ids.nix which have been removed by upstream with the ddclient module. - Rename to deprecate-ddclient, since it is impossible at the moment to prevent the corresponding mkRemovedOptionModule from being imported (https://github.com/NixOS/nixpkgs/issues/245265). I wrote a patch for nixpkgs that would at least allow individual mkRemovedOptionModule to be disable, but it is stuck for now: https://github.com/NixOS/nixpkgs/pull/245274. * //tools/magrathea: We need to pass -host to csc due to https://github.com/NixOS/nixpkgs/pull/246923 now. I don't fully grasp what this means, but it works and we are hardly cross-compiling, so it should be fine until I can get some answers from the change author. * //3p/nixpkgs:nixos-option: provide latest Nix as input https://github.com/NixOS/nixpkgs/pull/237442 adapted nixos-option to API changes in Nix's libraries which means it needs to be built against Nix 2.15, not 2.3. Let's hope it stays up to date with the latest Nix version in the future, so we can keep this override as is. Sadly this means that machines in depot will depend on two versions of Nix going forward. * //3p/nixpkgs:tdlib: update to match emacs-overlay Change-Id: Iac4dba58a076ecf25e8647fd9a06cbabf2f7809e Reviewed-on: https://cl.tvl.fyi/c/depot/+/9004 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-08-08 r/6472 feat(nix/sparseTree): add optional `name` argumentVincent Ambo5-42/+68
This allows pinning the name of the sparse tree derivation, which stops the continous rebuilding of tvix-store-proto dependents. I've opted to let the function take an attribute set instead and refactored the call sites appropriately. Change-Id: I3e57785094b1adbfffa24caf9f1c3384844fa200 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8965 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2023-08-08 r/6471 chore(users/Profpatsch): Update postgres module n stuffProfpatsch7-197/+443
Improvements from “upstream”, fresh served. Change-Id: I60e02835730f6a65739eaa729f3e3eed1a0693e6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9025 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-08 r/6470 fix(emacs-pkgs/term-switcher): don't open vterm over trampVincent Ambo1-3/+8
vterm doesn't really seem to support this, but it also doesn't stop the user from doing it, resulting in weirdly broken terminals. Change-Id: I5251306a2fb72e7aae4e6c70e522bad240222301 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9017 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
2023-08-08 r/6469 feat(tazjin/emacs): use python-mode for Starlark filesVincent Ambo1-0/+3
Change-Id: I1b86ef7849f0754ba0ff37cb261b38bf9c5aed12 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9016 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-08-08 r/6468 fix(tazjin/emacs): unbind dangerous telega.el shortcutVincent Ambo1-1/+2
The `a` shortcut of telega makes it dangerously easy to accidentally add users whose username starts with `a` to a group. This unbinds the shortcut, and leaves the member-adding function to be called manually and explicitly only. Change-Id: Iedb6291f16a299fc5d4ef824a1be6eb0a449001f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9015 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-08-07 r/6467 feat(users/Profpatsch/whatcd-resolver): Prefer remastersProfpatsch1-2/+10
Usually remasters just … sound better. Thus let’s give them a boost in the selection score. In case they are horrible they should have significantly less people seeding them and less snatches than their originals anyway (maybe the multiplier should be 1.5 or 2 instead?) Change-Id: I6817091f42b7bcb75eaf57a6aa635b5ba468f99e Reviewed-on: https://cl.tvl.fyi/c/depot/+/9014 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de>
2023-08-06 r/6466 chore(users/Profpatsch): Move Multipart2 into new webstuff packageProfpatsch7-2/+104
Change-Id: I903f1b554beed1240d2a9cf14ff44d1f3cb41ec5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9013 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-06 r/6465 chore(users/Profpatsch/whatcd-resolver): build with nixProfpatsch3-2/+51
Change-Id: I2d6ee30671bb60a96bcbfede1fd7a17fcf7c3ca8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9012 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-08-06 r/6464 chore(users/Profpatsch): clean up haskell libs a littleProfpatsch12-336/+123
Change-Id: Ia9a6c5a754ca8f2912308feb5a26f5276a08d24c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9011 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-08-06 r/6463 docs(users/Profpatsch/jbovlaste-sqlite): add parser docsProfpatsch1-1/+14
Change-Id: I62b6b9ee1ce5231e1d486db9f7e1e7b66408fca6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9010 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2023-08-04 r/6462 feat(tazjin/emacs): make zoxide project opener work without gitVincent Ambo2-5/+9
Work projects are not in git, but I still want to fuzzy jump to them. Change-Id: Iced78519da69b6992d253e2a0c9ed485f1347164 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9005 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
2023-08-03 r/6461 feat(grfn/emacs): Tweak org agenda commandsAspen Smith1-3/+3
Change-Id: Ib18ee79c347ca476e9541259e69e89ef65a46356 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8976 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2023-08-02 r/6460 feat(tazjin/emacs): add kubernetes modeVincent Ambo1-0/+1
Gonna try to use this not for what it's intended )) Change-Id: I669422323197cd4dc3812af399f17ed429871108 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9002 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-08-01 r/6459 docs(nix-1p): explain scope of `with`Vincent Ambo1-0/+8
This fixes https://github.com/tazjin/nix-1p/issues/13 Due to with's use of a semicolon instead of some kind of bracing statement, people can get confused about what the scope of a `with` is. Hopefully this change should make it more explicit. Change-Id: Ifaff28e09a2e8b8b244a9c11d44b2780dee284ee Reviewed-on: https://cl.tvl.fyi/c/depot/+/8951 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2023-07-31 r/6458 refactor(tvix/nix-compat/derivation/tests): fix typoFlorian Klink1-1/+1
Change-Id: I764232378f79f16c781870d467469db91a2f14d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9001 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-07-31 r/6457 refactor(tvix/nix-compat): use local write::*;Florian Klink1-15/+17
Change-Id: I43cc1d5b3419255f815490b2e10f05db19e3bffc Reviewed-on: https://cl.tvl.fyi/c/depot/+/9000 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-07-31 r/6456 refactor(tvix/nix-compat/test): rename `data` identifierFlorian Klink1-23/+26
Make it more obvious if these are bytes pointing to JSON or ATerm, so we don't get confused. Change-Id: I2402c687b7ba9c05aac20ed63b0df54e4e96a9d8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8998 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-07-31 r/6455 refactor(tvix/nix-compat/derivation): drop some useless allocationsFlorian Klink1-6/+3
Change-Id: I85e44e24e9ec3fe4284f02623a1ac7ca9935e554 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8999 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-07-31 r/6454 refactor(tvix/nix-compat/derivation): use writer.write_allFlorian Klink2-8/+10
This is more concise than a io::copy of a Cursor to bytes, and we have everything to be written in memory. Change-Id: I81f34666aa61aef4e16b33423ce4a69c3781efc3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8997 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-07-31 r/6453 refactor(tvix/cli/refscan): use wu-manber crate with &[u8] supportFlorian Klink6-29/+15
PR'ed at https://github.com/tvlfyi/wu-manber/pull/1, and now merged. Change-Id: I8c71e359196396a1d42a3ea2ab7ac15b137b2db0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8992 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-07-31 r/6452 refactor(tvix/derivation): move comma writing business upFlorian Klink2-8/+13
write_input_derivations shouldn't need to write a comma to separate it from the previous output from write_outputs. This is better placed in the function calling all of these helper functions. Change-Id: I9ccc440e4665b52369ef39e75151b9a29469ce48 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8995 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-07-31 r/6451 refactor(tvix/nix-compat/derivation): generic write_array_elementsFlorian Klink1-14/+14
We're happy with any &[S], as long as <S: AsRef<[u8]>. This allows passing both strings and &[u8]. Change-Id: If2a80d9b1ee33ba328c9cdab4fa83ca7b98a71e2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8994 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-07-31 r/6450 refactor(tvix/nix-compat/derivation): simplifyFlorian Klink3-64/+51
Let the escape function only take care of string escaping, not quoting. Let write_array_elements always quote and escape strings it consumes. Move the business of writing additional wrapping characters around it to the caller. Change-Id: Ib8dea69c409561b49862c531ba5a3fe6c2f061f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8993 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI