about summary refs log tree commit diff
path: root/users/Profpatsch/netencode/default.nix (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06 r/2188 feat(users/Profpatsch/netencode): decode from UProfpatsch1-2/+3
Since we don’t necessarily need to decode deeply, we can make the decoders take a `U` instead of a `T`. Change-Id: I9704a21edb3922d58411e6807d027d684b18d390 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2492 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-02-06 r/2180 fix(users/Profpatsch/netencode_mustache): add arglib crate to depssterni1-0/+1
Seems like 5d44df3af65767e731c0dd239bd1d9664edbb361 forgot to add the newly split out crate to the dependencies of netencode_mustache. CI didn't pick up on it since it is hidden away from readTree in an attrset in a file. Change-Id: I7df9a636d849de48a99562d1cda8c0e6765f4781 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2485 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2176 feat(users/Profpatsch): add die_* helpers for semantic exit errorsProfpatsch1-3/+6
There is this semantic exit code schema championed by execline and skaware tooling, and we refined and documented it a bit in lorri https://github.com/nix-community/lorri/blob/d1d673d42090f0cfe8ab9b92b465315a9e7d30a3/src/ops/mod.rs#L24-L35 in the past. This just transcribes the error messages into simple helper functions. Applies the functions to the places where we would panic or die `sys::exit()` instead. Change-Id: I15ca05cd6f99a25a3378518be94110eab416354e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2475 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2175 feat(users/Profpatsch/execline): add args_for_execProfpatsch1-9/+8
`exec_into_args` would just read argv and exec into it, but we want to be able to write commands which take some positional arguments first. Thus we split the invocation into `args_for_exec`, which returns the positional arguments and prog, and then pass prog to `exec_into_args` when we want to exec eventually (prog is still an iterator at this point). Change-Id: I0b180c1a100b96363fe33ba2c42034ed41716b7a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2474 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2173 feat(users/Profpatsch/netencode): add record-splice-envProfpatsch1-0/+25
Splice a netencode record from stdin into the environment. Change-Id: I7eac19e18164e070e4463ee431d9b0e955857b9c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2454 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-27 r/2149 chore(users/Profpatsch/netencode): netencode.nix -> gen.nixProfpatsch1-2/+2
Change-Id: I7ccbfe863fbff65015caa8c740b80c4bb5c59dc1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2446 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-01-03 r/2058 feat(Profpatsch/netencode): add netencode-mustacheProfpatsch1-0/+51
A little executable, combining the netencode and mustache libraries to make easy templating from the command line possible. Combined with the nix netencode generators, it’s now trivial to populate a mustache template with (nearly) arbitrary data. Yay. Change-Id: I5b892c38fbc33dd826a26174dd9567f0b72e6322 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2320 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-01-03 r/2057 feat(Profpatsch): dump netencode spec & parserProfpatsch1-0/+48
The netencode standard, a no-nonsense extension of netstrings for structured data. Includes a nix generator module and a rust parsing library. Imported from https://github.com/openlab-aux/vuizvui/tree/e409df3861f48de44d0e37277ce007e348a7a0dc/pkgs/profpatsch/netencode Original license GPLv3, but I’m the sole author, so I transfer it to whatever license depot uses. Change-Id: I4f6fa97120a0fd861eeef35085a3dd642ab7c407 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2319 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>