Commit graph

336 commits

Author SHA1 Message Date
Vincent Ambo
1f98cea9b2 feat(web/tvl/blog): Publish introductory Tvix blog post
Change-Id: I16c565ac1194cec44382b77f1c65c5ff569fdcca
2021-12-01 17:38:32 +00:00
Vincent Ambo
8318178b5f feat(web/tvl): List blog posts on homepage
Change-Id: Ic0ee18466fbaca1a374e7489be640f49571eb9c5
2021-12-01 12:37:50 +03:00
Vincent Ambo
79681c9e21 fix(web/tvl/blog): Include only published posts in listings & feed
Change-Id: I76c9c2c5cc82c7d0f59f907b6f1abee92a92cbf7
2021-12-01 12:37:50 +03:00
Vincent Ambo
c725f89d8b refactor(web/tvl/blog): Update Tvix intro blog post
This incorporates feedback from sterni from cl/4052 and chipb on IRC.

Change-Id: I0547d130dcd578746d5183c563be4b1d042cb5f8
2021-12-01 01:50:57 +03:00
Vincent Ambo
f641378948 fix(web/tvl/blog): Fix link to embedded image
Change-Id: I8bec643267785c6d3523380a2a17ab5e9213b51c
2021-11-30 18:52:53 +03:00
Vincent Ambo
8133fed255 feat(web/tvl/blog): Write Tvix introduction blog post
This post is intended to just let people know about the existence of
Tvix, tell them a bit about the background and how to follow along.

Change-Id: Ib5194d3aa385a0e30b4768ba28cb063784f6e0a3
2021-11-30 18:45:44 +03:00
Vincent Ambo
e61b50baf9 chore(web): Correct URLs for assets & feeds on TVL blog
Change-Id: I8720d49f8f3f4010f57a53e763a4f246bf4eb3d8
2021-11-30 12:51:30 +03:00
Vincent Ambo
4f1249e46f refactor(readTree): Move 'drvTargets' into readTree
This function is also generally useful for readTree consumers that
have the concept of subtargets.

Change-Id: Ic7fc03380dec6953fb288763a28e50ab3624d233
2021-11-23 14:42:08 +00:00
sterni
3d4e992c6f feat(web/tvl/template): add title to derivation name
This should help when debugging template generated derivations.

Change-Id: I9958a7e67c8442c5ad97da2a9d3622a0556b6a1a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3861
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-11-13 13:28:06 +00:00
sterni
53ab5716aa fix(web/static): avoid drvHash unnecessarily inflating closures
The string context of drvPath apparently causes a derivation to
_directly_ reference the whole dependency closure of the derivation
drvPath belongs to. This not only is unnecessary in this case (since we
are using drvHash to construct HTTP URLs which are primarily contigent
on the deployed configuration and not the shape of the nix store), but
also creates a very confusing derivation (e. g. web.tvl's index.html
would *directly* reference pandoc).

Change-Id: I6e9900e9e35fbd639061e53322e4ccb3fbb7e7ec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3862
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-11-13 13:27:59 +00:00
Vincent Ambo
1fbb960acf fix(tvl/logo): Fix rendering of PNG files
The previous format for entering the shape of the 'V' (as exported by
Inkscape) is incompatible with the PDF rendering process, somehow.

This reverts the letter back to the old path definition format with
the offending point manually removed.

Change-Id: I6ff3310afb5a757d657f2f0d8a761f355a8e50c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3843
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-11-12 15:18:41 +00:00
Vincent Ambo
a3d0beceaf fix(tvl/logo): Fix shape of 'V'
There was an additional point in this letter's path, which led to a
small fragment of the "buttcrack" remaining.

Change-Id: I4aa25190c2f2d5fbae55d85c499939ec72a25add
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3842
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-11-12 08:39:13 +00:00
Vincent Ambo
875ef0a605 fix(web/blog): make base URL configurable for atom feeds
This was previously hardcoded to tazj.in, which is not going to work
of course.

Instead it now takes the blog config which has a new baseUrl
parameter. For ease of use, the configs of my and the TVL blog have
been moved into a location that is accessible in the tree for reuse.

Change-Id: I94e71aaa7859db4380eb7013740a17f6b6a02620
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3777
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-11-08 10:39:04 +00:00
Vincent Ambo
4f71638e49 docs(atward): Document availability of new query types
Change-Id: Ie96eae39722c0bd22f3801cc9e24c28148f0a0cd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3779
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-07 14:08:38 +00:00
Vincent Ambo
674603f6c8 feat(web/tvl): Render blog posts and atom feed for TVL
Includes the blog posts and feed in the $out directory, but without
linking them from the TVL homepage yet.

Change-Id: If9c094b29e43e9a81b0cc3d731261dc4b10557c1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3776
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-11-05 14:24:53 +00:00
Vincent Ambo
4482bc2c82 feat(web/tvl/blog): Add scaffolding for first blog post
No content yet, but I need this in place to chop up the other changes
nicely.

Change-Id: I4302e14ab513d6d4dd23e9e8ab5493223b9a80b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3774
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-11-05 14:24:53 +00:00
Vincent Ambo
4baf633622 refactor(web/tvl/template): Move footer into a separate target
This makes it possible for the footer to be reused in other places,
e.g. when templating blog posts (which do not go through
//web/tvl/template (yet)).

Change-Id: Ia8ab0e1c6db4f76b4de49239e11a4474038f60ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3773
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-05 12:51:36 +00:00
Vincent Ambo
10e279ac13 feat(atward): Support depot revision queries (r/...)
Redirects these to the cgit commit view. Only supports cgit because we
don't have a good way to coax Sourcegraph into fetching these refs.

Change-Id: I8c28ed015ba37c04eb4b7a667bde70ff6a92bf4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3772
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-05 12:26:44 +00:00
Vincent Ambo
0e5730a26f fix(web/blog): Correctly wrap footer content
Name clash went undetected because I called this variable the same
thing, oops.

Change-Id: Iafa508f26887302b1c256088c50c68cd0ed7eea2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3771
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-05 10:39:14 +00:00
Vincent Ambo
f360bbdcf0 refactor(web/blog): Move atom feed creation logic to //web/blog
This was previously all inside of my personal homepage configuration,
but that's not really where it belongs.

This moves the blog post -> feed entry logic to //web/blog and moves
some other minor logic (like entry order) into the atom feed
implementation itself.

Change-Id: Idde0241c48e979580de73f2b9afd04e6ca7f4c9a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3770
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-04 15:57:56 +00:00
Vincent Ambo
bbf92dcdea refactor(web/blog): Configurable blog name and footer
Required for actually using this generically for the TVL blog.

Change-Id: I92d8d10341f9ab4f92c90f7976be261b3255a0f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3768
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-03 15:43:57 +00:00
Vincent Ambo
08d46ad293 chore(web/blog): Move out of //users/tazjin
This will also be used for the TVL blog, with status updates of
projects like Tvix.

Note that while this commit evaluates, there are still some things
specific to my blog in this code which I'll untangle in a future commit.

Change-Id: If59431161b165d7249cbb856073a4cae84a1bfbf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3732
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-10-22 09:56:31 +00:00
Smitty
4ea7fc392a feat(web/panettone): support dark mode
When the system is set to dark mode, this is detected through
prefers-color-scheme and the color scheme is adjusted accordingly. This
fixes #18.

The colors are set using CSS variables on the body that are overrridden
based on the current color scheme.

Change-Id: Id2f95dee4d6968e1b62ce37534f623e489fabde4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3722
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-20 19:52:13 +00:00
Vincent Ambo
8301825124 chore(web/atom-feed): Move feed generator out of //users/tazjin
I intend to use this for updates on TVL projects, which will end up on
the homepage, which is outside of //users.

Change-Id: I03542d1bcef3d9fc4599294655caab5ed22ba5d9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3728
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-16 08:47:16 +00:00
sterni
e7c0d6eb12 refactor(web/bubblegum): avoid dumping depot into store
cleanSource needs to import the path into store which is quite slow at
this point. Since we are filtering the path later anyways, using the
original path is probably perfectly fine and speeds up builds (which is
nice when iterating on something).

Change-Id: I0628854d754b5903eb4ae93a3c3e2539b2c1c7e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3705
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-10-10 10:03:03 +00:00
sterni
2397fd8d56 feat(nix/sparseTree): allow specifying subtrees as relative paths
Passed strings will be treated as a relative path below the given root,
which is quite convenient when using depot.path by eliminating a lot of
repetition.

Change-Id: I3da6058094484f4a6ffbb84f89ad4472b502a00c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3704
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-10-10 10:03:03 +00:00
Vincent Ambo
26f0ba5464 refactor(web): use static.tvl.{fyi|su} for static assets
Replaces all uses of relative static paths in TVL pages with the
static.tvl.fyi domain. Where possible, the drv hash is directly
embedded in the content.

Change-Id: Ia882dd37ceae9d047cd81cf1eb37a856b339643a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3682
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-07 14:21:18 +00:00
Vincent Ambo
348cf5ae73 refactor(web/tvl/template): default staticUrl to static.tvl.{fyi|su}
Change-Id: Ibccb690dc1371499e9800d4414002ce586490a91
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3681
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-10-05 13:18:48 +00:00
Vincent Ambo
69ed4984e3 feat(web/static): Add TVL logo to static files
Change-Id: Ie5ee4fe9d137cde9502ded1558fae3ad685b8863
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3661
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-01 15:59:38 +00:00
Vincent Ambo
b1f52b2617 feat(web/static): Expose drvHash attribute on derivation
This can be used for easy cachebusting of static assets, so that we
can serve them all with a really long cache-time easily.

Change-Id: I7c9f6beddec58e1caf02cda33bc587590217a939
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3660
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-01 15:33:47 +00:00
Vincent Ambo
5c9c4aa566 refactor(web/tvl/template): Make static asset URL configurable
Change-Id: I168924cd7b15103d64c9ad72172f72304e1d3a7d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3659
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-01 15:33:47 +00:00
Vincent Ambo
0ec6b4fad6 feat(web/tvl/template): Support extraFooter argument
Change-Id: If42bb8476cd513d7844ef3494e82563a5786c670
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3649
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-28 22:04:10 +00:00
Vincent Ambo
c0f2ec2f70 fix(web/tvl/logo): Make the logo slightly ... faster
grfn pointed out that the previous animation was so subtle that it
could be mistaken for a symptom of perceptual distortion, which is not
ideal.

This doubles the speed of the animation to make it more obvious that
animation is not taking place in the viewer's head.

Change-Id: Icd836e91677dfab44357932b53673d701ac6b9f3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3647
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2021-09-27 20:42:46 +00:00
Vincent Ambo
3e7ed05887 docs(web/tvl): Update copy on the TVL website
Pointing people at IRC and mentioning that there's technology
involved, etc.

Change-Id: I414c006952d60b1fff619edda5016bb2a8714dfb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3640
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2021-09-27 20:11:21 +00:00
Vincent Ambo
c4b718538b chore(web/tvl): Prune urbint from TVL graph
This isn't really adding anything and I don't think anyone
particularly wants us to link to them.

Change-Id: I6c1c8949d8e64e8c50cc8220a911183b2a166232
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3632
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-09-27 15:42:25 +00:00
Vincent Ambo
e5c3b9d391 feat(web/cgit): Use new logo in cgit page
Change-Id: I5212b235aa2a72c90e4795dce4c9fccfa00ddec3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3629
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-09-27 15:41:29 +00:00
Vincent Ambo
6c2e157264 refactor(web/tvl/logo): Convert lambdas into <use> elements
Some mostly manual refactoring of the logo, assisted by inkscape to
determine some details.

Changes:

* grid-aligned lambda & virus body shape
* replaced all lambdas except the top-left one with <use> statements
  of that lambda, this ensures that they actually have the same shape
* flipped the feet ... I think it looks better like this?
* split the virus body and lambda into different groups, which also
  easily allows styling them separately

Change-Id: Idaf1e3fe273b8c5461f5e433c1b0124fc534d9c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3634
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-09-26 10:33:24 +00:00
Vincent Ambo
ddb21647e4 style(web/tvl/logo): Add dark & light versions, dim background
Currently the pitch black colour of the logo outline looks a bit
strange on the homepage, dimming this to the same colour as the text
is nicer.

While poking around in that colouring segment I also made a way to
spit out light logos instead (to use on dark backgrounds).

Note: The light colours are just picked from our web CSS, but they
don't actually look good yet - it also needs a different palette. For
now nothing uses the light version.

Change-Id: Ibfe7fa252cd40b803ac96047d0627dad0d6d9ac2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3633
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-09-26 10:33:24 +00:00
Vincent Ambo
289de14fc4 feat(web/tvl): Use new TVL logo on the main homepage
Change-Id: I4b12b33bab54dbb099d97eaa4c14ca3072c4cd66
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3628
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-24 15:31:01 +00:00
Vincent Ambo
2229a32ae9 fix(web/tvl/logo): Fix bounding box of the SVG file
This trims the huge amount of whitespace on all sides of the logo.

Change-Id: Ic14247e002839db729131550f7c7528d080ab519
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3627
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-24 15:31:01 +00:00
Vincent Ambo
8d40c84408 feat(web/tvl): Check in first version of new TVL logo
The exported SVG was hand-edited to make it as understandable as
possible, the components within it are grouped sensibly.

We noticed that it looks best with different fill colours for the
armchair, so some included Nix code generates a colour animation (e.g.
for the homepage) and differently coloured export PNGs (for different
places).

Thanks Varia <3

Change-Id: Ifdb5f4ff7827caf10d193b99e81b7c8498b35ce4
2021-09-22 21:28:43 +03:00
Vincent Ambo
d0c0227a7b refactor(web/tvl/template): Don't forcefully embed title in page
This hands more layout control back to the page content instead of the
template. There are cases (currently experimenting with logo layout)
where it's visually nicer if there isn't a page title, but the rest of
the template still applies.

Change-Id: Ia3cd0c750beec5408e631760f1faeea8efec91db
2021-09-22 21:28:43 +03:00
sterni
9a89446478 fix(web/tvl): consistently uppercase Profpatsch
Him and me floating on our own is kinda cute, but breaks the graph.

Change-Id: I043b327172781447bd0ce923e78e72f34bbff41b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3573
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-09-18 14:25:18 +00:00
Vincent Ambo
ec38839c33 feat(git-serving): Configure josh to serve the depot over HTTP
Previously we served the dumb git HTTP protocol from code.tvl.fyi via
cgit. This CL disables this feature and instead runs josh in the same
location (by redirecting appropriately), but while also enabling
partial cloning of all subtrees of the depot.

For example, after this CL the following would result in an
independent clone of //nix/readTree:

    git clone https://code.tvl.fyi/depot.git:/nix/readTree.git

Note that there are no josh workspaces configured at all for now,
these references are only for static depot subpaths.

Please refer to the documentation for josh for more information on
available kinds of josh filters.

Josh state is kept in a systemd state directory in /var/lib/josh and
backed up to Restic. Backing this up is necessary, as josh uses
stateful information to do things like tracking merges and rewriting
history per subtree appropriately to avoid cloned repositories ending
up in peculiar states.

Change-Id: I156f0298c2aa42e3bdbf5a0e86109070d640c56e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3563
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2021-09-16 20:34:05 +00:00
Vincent Ambo
f35afb0e4a chore(cgit-taz): Disable HTTP git serving
We don't need this anymore as josh will be doing it instead.

Change-Id: I04324324fefa2b44604a8a5fad4dd3c7b7fe97a3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3564
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2021-09-16 20:34:05 +00:00
sterni
c0e4b863c7 refactor(web/tvl): translate to markdown
This is mostly equivalent, but we need to accomodate cheddar a bit:

* cheddar doesn't like markdown inside of HTML, so the <main> tag
  around the image needs to go.

* cheddar messes with a top-level SVG for some reason, so we need to
  wrap it in a <div> in order to prevent that.

Change-Id: If9ed516623e81e24f600ee9f1b6d4d611b5bcedd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3117
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-09-15 12:55:45 +00:00
Vincent Ambo
2c35244d16 feat(web/template): Link to CI in TVL page footers
Change-Id: I53229374605774f34d3cfda2b071f65b79227a24
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3555
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-09-15 12:32:50 +00:00
sterni
318d10e608 chore(nint): move from //users/sterni to //nix
Since //web/bubblegum depends on nint, we need to move it to a non user
directory to conform with the policy established via cl/3434.
Note that this likely doesn't mean greater stability (which isn't
really implied in depot anyways), since I still would like to use a more
elaborate calling convention to allow for additional useful features.

Change-Id: I616f905d8df13e3363674aab69a797b0d39fdd79
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3506
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-09-10 11:08:03 +00:00
sterni
3a8925239a refactor(web/bubblegum): only rebuild examples on dependency change
Using sparseTree we can make a (surprisingly long) list of things from
depot the examples depend on and create a stripped down depot version
which only contains them. As a result the examples are no longer rebuilt
on every commit.

Change-Id: I3693570ca4bdbbf9da795e552f278f3b1b1b77a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3504
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-09-09 15:57:58 +00:00
Vincent Ambo
0dbad73ff1 chore(web/tvl): Update some of the members in the TVL graph
Some leavers, some newcomers (some of which aren't actually new) and
so on. There are some lurkers in the IRC channel who I didn't include.

Change-Id: I9bf6b83ef1fadfb19bc6836f6f5946f115af30f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3482
Tested-by: BuildkiteCI
Reviewed-by: Mike Johnson <mdj@mikejohnson.xyz>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-31 23:29:35 +00:00
Vincent Ambo
f6638ce62c fix(web): tazjin.css -> tvl.css
Bug introduced by the previous static asset move.

Change-Id: I827976e468e4ce877a12dfbca6126b3a7445e783
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3440
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-26 20:57:02 +00:00
Vincent Ambo
72ebd3411b fix(atward): Redirect // queries to depot root
Makes it possible to open the default code viewer for the user at the
depot root by searching for `//`.

Fixes b/134.

Change-Id: I409ad36cea28de27cd1789a84eda71f8979d3133
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3437
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-26 19:02:23 +00:00
Vincent Ambo
da0b330756 chore(web/tvl): Move TVL static assets out of //users/tazjin
It's now more like my personal homepage depends on TVL assets, not the
other way around.

Change-Id: Ifb9d61aa8ec2cab549e25de3a3dfbbd08f3d336c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3435
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-08-26 17:46:06 +00:00
sterni
d7e70b1d72 feat(nix/buildLisp): add ccl
This adds support for Clozure's CL implementation to buildLisp. This is
quite trivial in comparison to ECL since SBCL and CCL have very similar
in how they work (so much so that CCL also suffers from b/136).

Also the similarities in the code actually added here are striking, so
I'll try to make an effort to reduce the code duplication in the
future.

To fix builds with CCL the following changes were made:

* //3p/lisp/nibbles: The double inclusion of the types.lisp file was
  fixed. CCL doesn't like double definitions and refuses to compile
  otherwise.

* //3p/lisp/physical-quantities: Update to a new bug fix release which
  contains a compilation fix for CCL.

* //3p/lisp/routes: apply a patch fixing the build which was previously
  failing due to a double definition.

* //3p/lisp/usocket: only depend on sb-bsd-sockets for SBCL and ECL, the
  latter of which seems to have a SBCL compatible implementation of the
  package.

* Conditionally include a few CCL-specific source files and add
  `badImplementation` entries for the remaining failures which are
  //fun/gemma (to be expected) and //web/panettone which fails with an
  incredibly vague message.

Change-Id: I666efdc39a0f16ee1bb6e23225784c709b04e740
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3350
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-08-24 22:00:15 +00:00
sterni
02566cdcfb feat(nix/buildLisp): add ecl
Adds ECL as a second supported implementation, specifically a statically
linked ECL. This is interesting because we can create statically linked
binaries, but has a few drawbacks which doesn't make it generally
useful:

* Loading things is very slow: The statically linked ECL only has byte
  compilation available, so when we do load things or use the REPL it is
  significantly worse than with e. g. SBCL.

* We can't load shared objects via the FFI since ECL's dffi is not
  available when linked statically. This means that as it stands, we
  can't build a statically linked //web/panettone for example.

Since ECL is quite slow anyways, I think these drawbacks are worth it
since the biggest reason for using ECL would be to get a statically
linked binary. If we change our minds, it shouldn't be too hard to
provide ecl-static and ecl-dynamic as separate implementations.

ECL is LGPL and some libraries it uses as part of its runtime are as
well. I've outlined in the ecl-static overlay why this should be of no
concern in the context of depot even though we are statically linking.

Currently everything is building except projects that are using cffi to
load shared libaries which have gotten an appropriate
`badImplementations` entry. To get the rest building the following
changes were made:

* Anywhere a dependency on UIOP is expressed as `bundled "uiop"` we now
  use `bundled "asdf"` for all implementations except SBCL. From my
  testing, SBCL seems to be the only implementation to support using
  `(require 'uiop)` to only load the UIOP package. Where both a
  dependency on ASDF and UIOP exists, we just delete the UIOP one.
  `(require 'asdf)` always causes UIOP to be available.

* Where appropriate only conditionally compile SBCL-specific code and
  if any build the corresponding files for ECL.

* //lisp/klatre: Use the standard condition parse-error for all
  implementations except SBCL in try-parse-integer.

* //3p/lisp/ironclad: disable SBCL assembly optimization hack for all
  other platforms as it may interfere with compilation.

* //3p/lisp/trivial-mimes: prevent call to asdf function by substituting
  it out of the source since it always errors out in ECL and we hardcode
  the correct path elsewhere anyways.

As it stands ECL still suffers from a very weird problem which happens
when compiling postmodern and moptilities:
https://gitlab.com/embeddable-common-lisp/ecl/-/issues/651

Change-Id: I0285924f92ac154126b4c42145073c3fb33702ed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3297
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: eta <tvl@eta.st>
2021-08-24 22:00:15 +00:00
Vincent Ambo
6f238c1c90 feat(atward): Handle plain host queries
Redirects host queries with no parameters (e.g. `cs`, `todo`, `b`) to
the start page of the appropriate host.

Fixes: b/133

Change-Id: I9d9dee753cfb460a97b73f39bbfe3cae54aae89b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3184
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-06-12 19:14:55 +00:00
Cynthia Revström
0491fb24bf fix(atward): Update link to use at.tvl.fyi
The link for atward's source code was using atward.tvl.fyi,
this makes the cs cookie (if set) for at.tvl.fyi not work.

Change-Id: I644f0341ecaf2caea0b71a950686579dfd18d092
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3155
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-24 20:34:07 +00:00
Vincent Ambo
224c9ca0bb chore: Replace remaining mentions of ##tvl[-dev] with #tvl
... and fix the capitalisation of hackint

Change-Id: I800aef75152d2dc77a33876888e36530143e9d3e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3148
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 19:46:46 +00:00
Griffin Smith
43e3355eae fix(panettone): Don't display the full before/after of issue bodies
Issue bodies tend to be very long, so displaying the full diff whenever
the issue is updated takes up a lot of visual room and is very hard to
read. Specifically for this field, this changes the display to only show
"updated the body of this issue", hiding the previous and new values.

At some point in the future, I'd love to have some CSS fun with active
anchor links to have an "expanded" view that *does* display the previous
and new value, but for now this should be fine - the data isn't gone,
after all!

Fixes: b/111
Change-Id: I0188540188729142e0b9205ff5cc9ea576c4edb6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3142
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 14:46:03 +00:00
Griffin Smith
a7d07e1a8a fix(panettone): Fix username display on issue events
7aebba7, which added anchor links to comments, also incorrectly added
only the *key* for the `:id` attribute to the `li` element for
issue *events*, swallowing up the next form (which happened to be the
username) as the value. this adds a *proper* value for the `:id`
attribute, bringing back the actual display of the username.

Fixes: b/97
Change-Id: I33ee628ddfd4a291e069980512fcc5f74014aac4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3141
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 14:41:15 +00:00
Griffin Smith
ba6bee80fb fix(panettone): Fix handling of issue-not-found
The accessor function to get the ID of the `model:issue-not-found`
condition is `not-found-id`, not `id`! Also, add a missing space to the
title.

Fixes: b/127
Change-Id: I91c71feaf1fe877e6a14453a9e75cf27d56fee31
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3140
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2021-05-23 14:16:58 +00:00
sterni
5177743f77 feat(tvl/template): use atward for dispatching to README.md
Ideally this means everyone gets to use their preferred code viewer.

Change-Id: I11005023c33eb111afd6c19b36d05dc581494ceb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3118
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-12 15:37:40 +00:00
sterni
1da235518a feat(web/atward): make checkbox label clickable
Change-Id: I147f1f2eee4f6b8f7ecea1b341d192477182d61c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3116
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-12 15:36:44 +00:00
sterni
c92f4ceacc refactor(web/atward): translate index page to markdown
Change-Id: I03ccbec1dd8ba58d80bd97eb40148dd395e500b2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3115
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-12 15:36:44 +00:00
sterni
25ff41452b feat(tvl/template): support markdown via cheddar
Since the template already was a derivation we can just reimplement a
specialized writeText which runs cheddar on parts of its input to avoid
import from derivation.

Change-Id: I0cffd0e86fd23a749599174260d04269379f4b5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3114
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-12 15:36:44 +00:00
sterni
513e733f8a feat(tvl/template): link to atward in footer
Change-Id: I929b8344251ceaba5a22c735c599407a0ec162a6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3113
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-12 15:36:44 +00:00
sterni
040416b3eb refactor(web): common template for index pages of tvl and atward
Use simple string interpolation based approach to templating and allow
changing the main body, the title and to inject extra HTML into the head
element. Additionally we can use `https://tvl.fyi/` instead of `/` when
referring to assets.

One limitation currently is that the template only works for index pages
(it link to self using `href="/"`), but this should be easy to fix.

For atward, instead of using the `onload` attribute of `body`, we now
register an event listener in JavaScript which makes the template code
less complicated. When building the derivation the template is rendered
to HTML and injected into the source.

Change-Id: I2ea0c5bf5f6286e781285ade7751a348bab3bdc8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3112
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-12 15:36:44 +00:00
Vincent Ambo
ebf6301941 feat(atward): Support reading configuration from cookies
Adds support for reading configuration (currently only the `cs`
parameter) from cookies and from URL query parameters. The latter take
precedence if set explicitly.

This is useful for users which can not edit their search query
parameters.

To make this easier to use the atward landing page has been updated
with a simple form where settings can be toggled. This requires
Javascript, but the script is small, embedded and MIT licensed (as is
the rest of this project). Users without Javascript will be shown a
notice about this.

It is of course possible to set the cookies manually, too.

Change-Id: Ie9a9dbeab4d9a97a349d7988e21f1b46037e1f72
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3110
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-12 13:19:11 +00:00
Florian Klink
85001c3540 fix(web/tvl): add two pixels to make favicon square
Fixes b/126.

Change-Id: I5caac45797738bccdbc346288fdf891dafdcefbb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3106
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-05-11 22:50:58 +00:00
Vincent Ambo
cb497a0cca feat(atward): Serve OpenSearch XML file to support Firefox
Firefox users can not easily add search engines to the browser unless
the page serves an OpenSearch description. This CL adds said
description according to the documentation:

https://developer.mozilla.org/en-US/docs/Web/OpenSearch

Change-Id: I358c5940304f4abd9e45dd72a64e46d3ce44b3e3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3105
Tested-by: BuildkiteCI
Reviewed-by: cynthia <cynthia@tvl.fyi>
2021-05-11 22:45:08 +00:00
Vincent Ambo
99d11bef5f feat(atward): Add an index page with setup instructions
Adds an index page that is rendered when there is no query parameter
in the URL. This means that going to at.tvl.fyi / atward.tvl.fyi
yields an actually useful page.

Change-Id: I018973a3c3e8b7b7167876fa99f34a008a17a4f2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3104
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2021-05-11 22:45:08 +00:00
Vincent Ambo
13336c6057 feat(atward): Add 'cs' query parameter to toggle Sourcegraph support
Users can set `?cs=true` to be sent to cs.tvl.fyi instead of
code.tvl.fyi for things that look like code paths.

Change-Id: I7c8f9b71cde25d35787c941e5308330c6f16f8d7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3102
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-11 14:20:31 +00:00
Vincent Ambo
d4bdfe8127 refactor(atward): Construct an atward query type from user requests
Rather than dealing with passing down the rouille request to
handlers (which would have become necessary as we start supporting
more user-controlled features), a new `atward::Query` type is
constructed from requests and passed to the dispatching logic instead.

For now this introduces no new features, it just shuffles things
around to prepare for that.

Change-Id: I08e18422c1fdbac4712c739a7acbb810ada697ca
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3101
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-11 14:20:31 +00:00
Vincent Ambo
61783bd2ba fix(atward): Better align unsupported query error with inspiration
If you can make sense of this commit, it will make sense to you.

Change-Id: Ib223bf97b7a28828a04f01bc96365f654549fa60
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3100
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-06 21:33:39 +00:00
Vincent Ambo
4de6648ae9 refactor(atward): Rename Query -> Handler
Query is actually going to be a ... Query.

Change-Id: Icc910a8eef47e201054cb1346bc4059c0458659f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3099
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-06 21:33:39 +00:00
Vincent Ambo
90db61a6f4 feat(web/atward): Support depot paths (to cgit for now)
Sends depot paths (such as //web/atward or //nix/readTree/README.md)
to cgit. If Markdown files are detected the user is sent to the about
page to get the rendered view.

Future work will make cgit vs. SourceGraph configurable.

Change-Id: I48dea2dc8994644fb5a6f4bfbb846c771996cfc3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3095
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-06 13:39:23 +00:00
Vincent Ambo
67389b6b0b fix(atward): Use 'q' query parameter for query instead
This removes a bunch of awkwardness around slashes in URLs, which also
frequently feature in our patterns.

Change-Id: I68c69d4c68436421951ee133bfbc067609f27bb6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3097
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-05-06 10:23:46 +00:00
Vincent Ambo
47d07e7b5f refactor(atward): Configure listen address
This appeases the flokli.

Change-Id: Ib6a6c1a2cc8780e7944913d9204b42505b29fdc0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3093
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-05 09:02:58 +00:00
Vincent Ambo
57502cfc46 feat(atward): Add query for changelists
Adds a query for things like cl/42

Change-Id: I144ee25c0f2c9956c81b349d653c5fec42602f9f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3092
Tested-by: BuildkiteCI
Reviewed-by: eta <eta@theta.eu.org>
2021-05-04 15:47:56 +00:00
Vincent Ambo
8c0776485e feat(web/atward): Wire up query resolution to a web server
Adds a simple web server which logs all incoming requests and either
sends the user to the correct destination, or gives up and displays an
error (in the future there'll be fallback searches so that peopple can
use this as their default search engine easily).

Change-Id: I4f10472dbc74fa9cc71fad0533da38eda2b6077c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3089
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2021-05-03 22:55:36 +00:00
Vincent Ambo
51b5475f40 feat(web/atward): Implement match scaffolding for TVL redirector
atward is going to be a new TVL service, living at atward.tvl.fyi,
which users can configure as a search engine in their browser.

It will understand a variety of TVL-specific query types (such as
bug/CL links or code paths). In the future it might also support
features like go-links.

This commit configures the initial setup for query matchers in atward
and adds an example query type (for bugs).

This is not yet wired up to a web server.

Change-Id: Ifaf06c3f5cc378eee7894b7576ef583fc89264f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3087
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
2021-05-03 22:55:36 +00:00
grfn
17239c597d revert: "feat(web/panettone): Allow requesting JSON"
This reverts commit 77c09076ec.

Reason for revert: It doesn't work - attempting to request any of the pages now gives:

[ERROR]] No keys match in SWITCH. Testing against
         "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
         with EQUAL.

Change-Id: Ic4c795fd2a971003a6823a3b68ddee9a03b9f7c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3061
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-04-30 11:54:45 +00:00
Griffin Smith
77c09076ec feat(web/panettone): Allow requesting JSON
Allow specifying an `Accept: application/json` header to the index and
show issue routes, to request that those pages be returned as JSON.

Change-Id: Ic225139fc9e7fdce0da98984df4ca987685dafe0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3043
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <mail@tazj.in>
2021-04-22 15:35:55 +00:00
sterni
f88ac5c0b5 feat(nix/utils): add storePathName, a more generic baseNameOf
This is a wrapper around baseNameOf which also can deal with
derivations. Added to //nix/utils since I've found myself introducing an
ad-hoc implementation of this for both //web/bubblegum and //nix/buildC.

Change-Id: I2fcd97a150d6eda21ab323fa0d881ff7442a892e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3049
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-20 11:00:52 +00:00
Vincent Ambo
929b38e8ae refactor(web/converse): Refactor first handlers to rouille
This commit starts the refactoring process towards dropping actix (and
tokio, ...). It builds, but at this commit, Converse does *not* work.

I decided to commit to avoid more ridiculous diffs.

Included changes:

* Added dependency on rouille.

* Refactored DbExecutor (formerly actix actor) to simply be a type
  with a few methods. Most actor messages still exist as they are
  being referred to by handlers.

* Started refactoring two of the handlers (and their related renderer
  functions) into Rouille's call scheme.

Important note: Rouille does not have safe session management out of
the box, and it will need to be implemented as this progresses.

Change-Id: I3e3f203e0705e561e1a3392e8f75dbe273d5fa81
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2861
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-20 10:44:57 +00:00
sterni
d485ebf01a fix(bubblegum): import lib from the new correct place
Since cl/2910 depot has no lib attribute anymore. Import it from the
depot fix point via depot.third_party.nixpkgs.lib to avoid passing
another argument and enlargening the shebang further.

Change-Id: I3c719eba38a5ceb36689ebf0409bd19d4f46a609
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3050
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-20 08:42:58 +00:00
Vincent Ambo
f520bd40ca refactor: Replace 'depotPath' with 'depot.path'
Instead of having two ways of accessing the path to the depot (one of
which was stuttering, depot.depotPath) we settle on only one:
depot.path.

This was mostly used for NixOS module imports.

Co-Authored-By: Florian Klink <flokli@flokli.de>
Change-Id: I2c0db23383fc34f6ca76baaad4cc4af2d9dfae15
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2962
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-12 21:55:07 +00:00
Griffin Smith
6266c5d32f refactor(users/glittershark): Rename to grfn
Rename my //users directory and all places that refer to glittershark to
grfn, including nix references and documentation.

This may require some extra attention inside of gerrit's database after
it lands to allow me to actually push things.

Change-Id: I4728b7ec2c60024392c1c1fa6e0d4a59b3e266fa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2933
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-12 14:45:51 +00:00
sterni
4edef59ba4 feat(panettone): don't use _ for em in inline markdown
Since we are still using third_party, underscores are kind of common in
issue titles and are probably often forgotten to escape. Let's just
support `*` for emphasized text in titles for now.

Change-Id: I305bcf4d4c59123bba4ce816a6da2ee8b022c34e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2926
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-11 20:11:07 +00:00
eta
d1fdf800e8 feat(tvl): remove aranea from tvl.dot
I've been told that they don't want to be in this any more, so references are
removed in this CL by request.

Change-Id: I80a04b714fc57781e57e8dce977d0aec2da4f009
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2927
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: eta <eta@theta.eu.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Tested-by: BuildkiteCI
2021-04-11 14:13:16 +00:00
Vincent Ambo
473604f567 refactor: Move nixpkgs attribute to third_party.nixpkgs
Please read b/108 to make sense of this.

This gets rid of the explicit list of exposed packages from nixpkgs,
and instead makes the entire package set available at
`third_party.nixpkgs`.

To accommodate this, a LOT of things have to be very slightly shuffled
around. Some of this was done in already submitted CLs, but this
change is unfortunately still quite noisy.

Pay extra attention to:

* overlay-like functionality that was partially moved to actual
  overlays (partially as in, the minimum required to get a green
  build)

* modified uses of the package set path, esp. in NixOS systems

Special notes:

* xanthous has been disabled in CI because of issues with the Haskell
  overlay
* //third_party/nix has been disabled because of other unclear
  dependency issues

Both of these will be tackled in a followup CL.

Change-Id: I2f9c60a4d275fdb5209264be0addfd7e06c53118
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2910
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2021-04-10 21:18:55 +00:00
sterni
055fe7ce8e fix(panettone): always use displayname in subjects
Emails for (re)opening and closing where send out with the user's DN in
the subject which is probably not what we want.

Using displayname-if-known is probably not necessary as there is not
really a case where (not *user*) wouldn't justify a 500 in this context.

Change-Id: Id12d3d9619f42eb5337c2d3482b7c1646b5d6a81
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2911
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-10 09:18:46 +00:00
sterni
435b883f5c fix(panettone): set external-format for stream from cheddar
drakma ignores the :external-format-in parameter if :want-stream is t:

> If want-stream is true, the message body is NOT read and instead
> the (open) socket stream is returned as the first return value.
> If the sixth value of HTTP-REQUEST is true, the stream should be
> closed (and not be re-used) after the body has been read. The
> stream returned is a flexi-stream with a chunked stream as its
> underlying stream. If you want to read binary data from this
> stream, read from the underlying stream which you can get with
> FLEXI-STREAM-STREAM.

Since it doesn't return a plain CL stream which would just work with
SBCL, we need to set the external format on the resulting flexi-stream.

Fixes b/107.

Change-Id: I6e3178123c0927ef21fabf8118d9d357c8afbd42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2869
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-06 16:34:15 +00:00
sterni
63a0b28bea refactor(panettone): remove code duplication in render-markdown
Move the common part (encoding/decoding json and connecting to cheddar)
into request-markdown-from-cheddar. The two render-markdown
implementations are now only thin wrappers around that function.

Change-Id: I81bb34b684af44228dcad02fca541082e6d060ce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2868
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-06 16:34:15 +00:00
Vincent Ambo
a87533695f fix(web/converse): Update to use mime_guess::from_path
... instead of its deprecated predecessor.

Change-Id: I8af286c6b1ee7c25c153f1209d094ae4f5eb53cc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2860
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-05 19:19:00 +00:00
Vincent Ambo
3b0b21f8d1 refactor(web/converse): Use crimp instead of reqwest
This simpler, curl-based HTTP client (which I wrote years ago) is a
first step towards cleaning up the dependency mess of converse.

Dependency stats: +4, -28

Change-Id: I4f5f3c9307895d261bfb0a6bcf2337b747f9a4c0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2859
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-05 19:19:00 +00:00
Vincent Ambo
8fc4e083c9 chore(web/converse): Apply 'cargo fix --edition'
This does not yet change up `extern crate` and `macro_use` statements,
but since we still depend on Diesel that also wouldn't work right now.

Change-Id: I36de1b7b56f7d220f567346e13bad8da06461517
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2858
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-05 19:19:00 +00:00
Vincent Ambo
a0c4b91955 fix(web/converse): Bare minimum changes to build in 2021
This project depends on Tokio, via actix, and both of those are bad
ideas. This wasn't as clear 3 years ago as it is now, but to
demonstrate it the project has amassed issues which required at least
this minimum of changes to be buildable in 2021 (using a modern
rustc).

Yes, this adds dozens of new dependencies again (because of a
top-level update) but don't worry: They will be gone when I'm done
here.

Change-Id: I1dde9dc0325da7bdcb6608359fab33e27692dc1d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2857
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-04-05 19:19:00 +00:00
Vincent Ambo
5387cc9e7d docs(converse): Convert README to Markdown
Change-Id: Iad5902622a9993c94116edc55de8fa5f6c38d3f1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2856
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-05 15:47:42 +00:00
Vincent Ambo
8e91e70b05 chore(converse): Remove old Github-specific things
* remove files that depot already has, or doesn't need
* remove links to old source location

Change-Id: Idcd9361bfed00289f09af62f5342c4fd8bd04404
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2855
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-05 15:47:42 +00:00