This is pretty much exactly the derivation from nixpkgs, with some
things removed to reduce the closure size (e.g. the various formatters
used in the default cgit version, which are replaced by cheddar in my
setup).
This overrides the upstream derivation to:
* use local sources
* build `git send-email`
It also calls autoreconf before building because files that are
included in the git distribution tarball (which the normal derivation
uses) are missing from source.
If you're on tree/foo/bar, the about link will now point to
about/foo/bar.
Currently the annoying thing about this is that it will also do it for
files.
This means that individual subtrees of a repository will also have
their READMEs rendered on the about page, for example:
/foo/bar/README.md
Will render on:
/about/foo/bar/
This is useful for monorepo setups in which subtrees represent
individual projects.
Generates URLs that do not include the repository name.
On git.tazj.in, only one repository (depot) is served - hence URLs
generated by cgit need not include the name.
Adds dottime (as defined on https://dotti.me) as a timestamp format.
This format is designed to simplify working with timestamps across
many different timezones by keeping the timestamp format itself in
UTC (and indicating this with a dot character), but appending the
local offset.
This is implemented as a new format because the timestamp needs to be
rendered both as UTC and including the offset, an implementation using
a strftime formatting string is not sufficient.
Similar to buildGo.nix, the library derivations carry information
about their dependencies which is merged when a load file is
instantiated.
The load files are created when compiling libraries, but will in the
future also be created when wrapping SBCL and dumping images.
It turns out I'm going to need multiple different OAuth clients for a
variety of reasons. This defaults to the client for tazj.in accounts,
but I use a different one in my work overlay.
This uses Nix to inject the path to the syntax highlighting assets
that ship with the bat source code into the cheddar build at compile
time, where the Rust compiler then inserts it into the binary via
macros.
bat has a lot of custom syntax highlighting definitions that they
collected from all over the place (including for languages like Nix!)
and this makes them accessible to cheddar.
Also if you're reading this, can you just take a moment to appreciate
how incredible it is that Nix just lets us do something like this?!