`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>
There might be exploits since we parsed the headers as utf8 even
though we actually want to interpret them as ASCII.
This fixes it, by using the ascii crate.
Thanks to @sterni for noticing.
Change-Id: I50b6a588d99b34e677cb22968cf0dfd8b331d11c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2457
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
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>
Decoders are implemented not directly on output types, but on trivial
proxy types, so that we can easily combine those into a decoder, and
then the associated type is the actual return value of the decoder.
Change-Id: Ibce98fa09fc944e02ab327112ec7ffbc09815830
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2455
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Most tools end by execing into their argv, so here’s a small rust
function which does the boilerplate.
Change-Id: I9748955cf53828e02f04d7e8d74fbaf10c1158b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2453
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Headers should always be ASCII, so let’s crash if they are not. The
thing gets a lot easier to use, and clients who fail this restriction
can just fuck off.
Also actually print the results to stdout instead of stderr …
Change-Id: I782c96c537ae11b541175e96453c4114e0a71b05
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2451
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
arglib is the simple idea of passing structured data via a
conventional environment variable instead of implementing an optparser
for every little tool.
Pop the envvar, decode the contents, return the contents.
Change-Id: Ie44148293a58aae9a0a613895176227d43b491bb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2449
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
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>
This should closely match the documented behaviour. It might still be
missing some edge cases of course.
Change-Id: I5c75fa045d5f3be8cf5eab787a02644500c14522
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2466
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
First step to slowly giving readTree some coverage, so we can do
refactoring without breaking functionality.
Change-Id: If25a8c0fa9c4ac7472c0473372f10a9326cccaf7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2465
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
We are going to export some tests under `nix.readTree.tests`, so in
order to do that and still have `nix.readTree` be a function, let’s
move it to `__functor`.
This requires wiring the `args` and `initPath` arguments through
explicitly.
Change-Id: Ife7956b85d35e59c22174b42dcb7cca83ed868ea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2464
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Uses `builtins.tryEval` to check that the expression throws when
`deepSeq`-ed.
Change-Id: I0d57cc37f473bb733f57a1b1c0d889084152fd2f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2463
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Previously we would throw or return `{}`, which doesn’t integrate
nicely into our CI; thus, let’s wrap it into a derivation which either
fails the build or doesn’t.
Change-Id: I65880d86b8393094661e57a0b32aafe748bf1dd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2462
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Nobody has actually done any experimentation with typed Go, so we're
getting rid of it for now - it's causing annoying IFD during build
graph generation.
Change-Id: Ibac3dea98ebed1b3ee08acda184d24c500cf695d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2458
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
It's not installed because it's broken right now
Change-Id: I1bf198788fb90aabe3ba1a7b65399c3579983704
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2459
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
This appears to be getting overridden by a package somewhere now
Change-Id: I4f0776b5ae65e5cfa936e3636ce1bb5e2c85790a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2427
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
This gives a permission denied error when I try to log in
Change-Id: Ibb9a66bb0ccec5fdf6839dd38ffd7e0a782687d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2425
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
* Fix find-user-by-dn raising an error condition if the search returns
no results, return nil instead.
* Adopt strategy of defaulting to “someone” as displayname if lookup
fails for all usage of displaynames in panettone.
I've tested this change for issues and comments created by missing
users. Adjusting the displayname seems to fix all 500 being created
by missing users both logged out and logged in.
Change-Id: I0a84eb0631c4a49f1664bed6d03afa60dce6eb47
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2448
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
This way ci should pick up on clhs-lookup since only a single derivation
is exposed with the default.nix and it is less cumbersome to type the
attribute path (users.sterni.clhs.clhs-lookup →
users.sterni.clhs-lookup). The exposed CLHS wasn't used for anything
anyways and I can always expose it again using passthru or extra if it's
ever merged.
Change-Id: I6c5aeba1b58ca650700c6efa0913e4b42685ea6b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2461
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
reads a http request or response from stdin, and parses its headers
into a netencoded record.
Darn rust code took way too long to write.
Change-Id: Ie99faa6d4bbd4996fa4e43fb119a11d85b611c99
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2447
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Basically what you expect, strings to text, ints to 64-bit integers,
attrs and lists to nested records and lists.
Change-Id: I9d3d841f32ab32a152cd61522f02ebde4a9b11d3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2444
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Apparently HashMap and Vec already do internal boxing, so the extra
indirection in the value isn’t needed.
Then, in order to make things uniform, move the boxing of `Sum` into
the `Tag` value. No extra boxing in the recursion! \o/
Change-Id: Ic21d2e3e6ac0c6e1f045bf2c9d3e9c5af446fcff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2443
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Recent channel updates have caused some issues for telega.el, mostly
because the version of tdlib (the C++ library for Telegram) and the
Emacs package are out of sync.
This overrides the version used in the Emacs package to a "known good"
commit. It would be useful to change the tdlib derivation in nixpkgs
to make this version mismatch a hard build error.
Change-Id: I9c994f783e1cc17e933432507cd13b65697efd4a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2445
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
There's a giant laser in the sky which makes it hard to read anything
on a dark theme.
Change-Id: I1dd0631dc8f8f693cceada4e62b25d4bde322e09
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2442
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
This is achieved by implementing a simple markdown renderer in CL which
has the following limitations:
* Only supports inline `code`, *emphasize 1*, _emphasize 2_ and
~~strikethrough~~.
* Does not support nested markup.
This allows for a relatively simple renderer which doesn't need to parse
markdown into a in-memory data structure first. The rendered result is
directly written to a stream to integrate well with cl-who which is also
reused for rendering tags and xml-escaping strings.
Fixes#90.
Change-Id: Ice88ed770b1fab6365f3b93e8663e25077befa0b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2389
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
I checked all :value attributes in panettone.lisp and wrapped them with
who:escape-string if its value comes from user-influenced places. Static
values or values from panettone internals are left as is.
I did not do a comprehensive check for other places where something
similar could happen though.
Fixes#92.
Change-Id: I134acc0d2f025f173588b37c19a93589365e879b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2401
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Instead of bothering with local-time's feature rich timezone support we
just pass the offset as an integer and render it ourselves.
Change-Id: I1df2d02153e3ef21ae3b2871ad6ef57d0f6eff86
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2423
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
This commit removes my user directory in the depot, my user account on whitby,
my entry in the LDAP database, and my entry in the website graph. I've had my
fun with TVL, but I want to move on to spending time on some other things.
This additionally removes aranea from the website graph, which they have
requested in private.
Change-Id: I2d098c8fe239f20d9f6c6cbf66a3dfb4a955a4cf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2436
Tested-by: BuildkiteCI
Reviewed-by: multi <depot@in-addr.xyz>
Reviewed-by: lukegb <lukegb@tvl.fyi>
This time, I'm excluding languages like CSS,HTML,Markdown,Org, which I think
makes the output a bit noisier than I'd like it to be.
TODO(wpcarro): Automate this process
Re-run `tokei --hidden --type=<comma-sep'd-langs> --sort code .` to update this
table.
Most of the errors at the moment are related to line-lengths exceeding my 80
character limit. While these are valid, the linter doesn't currently support
disabling these checks, which means that my Elisp code always fails this CI
step. This creates too much noise and conditions me to care less about CI
failures.
When the Elisp linter support this feature, I will gladly re-enable this step.
I changed the name of my Pipeline from briefcase -> post-receive, which broke
the URL for the badge.
This is easily fixed by visiting BuildKite's "Pipeline Settings" page.
To make things easier for testing, I setup the /verify endpoint as a GET, so
that I could email myself clickable URLs. With POST /verify, my options are:
- send email with an HTML button and form that POSTs to /verify
- email myself the curl instruction
I'm preferring the latter for now...
There is another extension for this already, but it hooks in after the
page has already started loading - doing it on the URL change handler
is much faster.
Change-Id: I442552cbd8bb040df999a1624cafd436f4a7b875
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2430
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
I managed to lock myself out by having the layout set to Russian while
locking the screen. This prevents that from happening.
Change-Id: I15780d2a626d96abe0af8db3736fad75034e66d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2424
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI