Commit graph

26 commits

Author SHA1 Message Date
Florian Klink
98863e7312 docs(views): update where josh-filter is coming from
We started using josh from nixpkgs since cl/11457, but forgot to update
this documentation.

Change-Id: I6e07227bcd3e955076d46146024edd89b69f08f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12244
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-18 20:44:39 +00:00
sterni
5384c9ac0e fix(views/kit): include dependency-analyzer
Since cl/11116, //nix/buildkite needs dependency-analyzer as an input.

Change-Id: I2d924d6648b4ebf39388d8142a99496ef854d0c1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11451
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
Tested-by: BuildkiteCI
2024-04-18 13:29:39 +00:00
Florian Klink
01f8ef1560 fix(tvix): apply cbtemulator patch in tvix view
This tells josh to include the patch from
third_party/overlays/patches/cbtemulator-uds.patch at
nixpkgs/cbtemulator-uds.patch.

We then use the `additionalOverlays` feature introduced earlier, and
pass it an overlay adding the patch to `cbtemulator`.

This only gets applied if tvix/shell.nix is not called with a pkgs
argument, which is the case in the tvix view.

Change-Id: I7bc5543460ddd30325ab0998e891c15fcaf8bcfe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11408
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
2024-04-13 12:09:47 +00:00
Vincent Ambo
db3ef5255f fix(views/tvix): Canonicalise Tvix workspace formatting
This change is done by josh on push back to Tvix, as the formatting of
our workspace files differs from its canonical formatting.

Change-Id: I97bf9d87f82b6acbe3350c1a3c99bd38b5af98e5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10251
Reviewed-by: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2023-12-11 10:22:12 +00:00
Florian Klink
a89695c4c5 chore(tvix): move buildkite.yml from views/tvix to tvix/
This should remove the ambiguity on where buildkite.yml should show up
at least. We might still want to move workspace.josh into tvix/ too at
some point, but that's blocked on
https://github.com/josh-project/josh/issues/1287

This commit doesn't cause any change in views/tvix, with a previous
version of this commit added to my HEAD, I ran josh-filter to verify it
still points to ce0df88561fee8a4d6052ca9f2a1792f899a202a.

Change-Id: Ic03e92260dc7725bc2fcf01b7c72a097d92c028e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9828
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2023-10-25 08:22:57 +00:00
Florian Klink
8b8a344647 fix(view/tvix): remove other default.nix files
These only work in depot usecases anyways.

Change-Id: I463ffb4e3ac2d3a20db3cace749e357c893e7188
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9557
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-10-07 05:47:32 +00:00
Florian Klink
03fec0b393 refactor(tvix,views/tvix): move shell into separate file
So far, we provided a custom `default.nix` in the root of the tvix josh
workspace, which re-defined the shell attribute from `tvix/default.nix`.
Some of the recent fixes, e.g. the MacOS-specific additions to the list
of dependencies however didn't get ported over to this file, and in
general, it's quite annoying to have two different places for these
things.

Initially I explored the idea of moving this default.nix file to a
default-depot.nix file in the josh worktree only, and then "polyfill"
some of the dependencies, or set up readTree in the josh workspace too,
but it turned out to pull in too many dependencies to be worth
the effort (nix.sparseTree, tools.depotfmt, crate2nix overlay,
third_party.gitignoreSource).

I now took a different approach - moving the definition of the `shell`
attribute from `tvix/default.nix` to its own `shell.nix` file, which is
imported from `tvix/default.nix` in regular depot usecases.

Josh workspace consumers only see the `shell.nix`, which can be used
in a self-contained fashion, the other `default.nix` is gone entirely,
and we update the workspace file to also not show `tvix/default.nix` at
the root either, so running `nix-shell` and then `cargo build` should
still work.

Change-Id: I6cb54d45d150c597612530ba44bc578f9d7f9120
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9556
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
2023-10-07 05:47:31 +00:00
Vincent Ambo
8d632af36e fix(views/tvix): add fuse dependencies to external shell view
Change-Id: Ie7b8c5b983e5b41bffe0748d0047ffcfd82072e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8759
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-06-13 12:50:45 +00:00
Vincent Ambo
7604833d2a fix(views/kit): provide lib argument to lazy-deps
Change-Id: I6687bda77a3160b922156de9045d5f8565be0a61
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8744
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
2023-06-11 17:05:56 +00:00
Florian Klink
e9686f84d9 fix(views/kit): communicate :unsign in the tvl-kit URL directly
Instead of prepending :unsign to all URLs in josh-proxy, and for all
calls to filteredGitPush, explicitly use it only in the filter we use
for the `export-kit` extraStep.

This means, people cloning tvl-kit via

> https://code.tvl.fyi/depot.git:workspace=views/kit.git

now need to update the URL to point to

> https://code.tvl.fyi/depot.git:unsign:workspace=views/kit.git

instead.

git@github.com:tvlfyi/kit.git will keep the same hashes, as it's updated
to export the unsigned workspace view of it.

This is less invasive than dooming every josh workspace to have to strip
signatures.

Change-Id: I6de05182fad4c3695081388c3bbf37306521d255
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8369
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-03-31 08:46:01 +00:00
Vincent Ambo
bf88421dc7 feat(views): export tvl-kit view
Change-Id: I739adb7d32d03294f8ec9962c3d93e35842af83b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8360
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2023-03-28 09:42:13 +00:00
Vincent Ambo
08bf03a3d8 refactor(views): move view export configuration to //views
Change-Id: I064b996fd52134b7e83541ea1190774c51a8ba30
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8359
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-03-28 09:42:12 +00:00
Florian Klink
dfb8b7a266 docs(views): extend README for josh-filter usage
Also document how these can be cloned by referring to a custom Gerrit
ref.

Change-Id: I5495a1c29bdd6d78215af7307953437f9cbca5db
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8198
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2023-03-03 14:56:04 +00:00
Florian Klink
48a80dfea0 fix(views/kit): allow setting localSystem when using tvl-kit
Because the passing around of externalArgs only happened in the readTree
instantiation in the repo root default.nix, but not in views/kit/
default.nix, it was not possible to get tvl-kit to instantiate the
bundled nixpkgs with a custom system.

This fixes invocations like

```
tvl-kit = import (sources.tvl-kit) { localSystem = "aarch64-linux"; };
```

Change-Id: I3a633e4d695d266459400ba74fc0693ecc5bfb54
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8197
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-03-03 14:56:04 +00:00
sterni
0b64577702 chore(3p/sources): Bump channels & overlays
* //3p/sources: temporarily switch to nixos-unstable-small, since it
  includes:

  - evans update we are interested in, allowing us to drop our evans
    patches.
  - awscli2 update that unbreaks //users/grfn

* //3p/overlays/tvl:

  - drop evans patches
  - update tdlib to 1.8.11 to make tazjin's emacs happy
  - drop obsolete mullvad workaround

* //users/grfn/keyboard: disable -Werror for array-bounds warnings.
  Seems like a non-trivial job to resolve the warning properly,
  hopefully GCC 12 still generates the same working code as GCC 11 used
  to.

* //users/grfn/system/home: remove yubikey-manager-qt.
  Yubico can't seem to keep that on pace with yubikey-manager. It
  requires a <5 version of the latter which is incompatible with the
  recently released cryptography >= 39.

* //3p/gerrit: update changed FOD hash for the fetch step

Change-Id: I590ab996247e69b0ab5059cd173840ef4ebfe939
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8133
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2023-03-02 14:35:49 +00:00
Florian Klink
2c4554679c feat(views/tvix): add buildkite pipeline
Change-Id: Iabfc8c64012500a39aaafb3976ceb4a249387ee8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8002
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-02-01 17:11:50 +00:00
Florian Klink
dbabf728b7 feat(views/tvix): add tvix josh workspace
This provides a trimmed-down version of //tvix, that allows building
tvix without all of the monorepo cloned.

We need to manually vendor in our patch for evans and ``--bytes-as-
base64`, as we don't have our depot overlays available in the josh
workspace.

Fixes https://b.tvl.fyi/issues/247.

Change-Id: I24306b8bb16ebf0df238b8f1eee0d47655a14827
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8000
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2023-02-01 17:11:50 +00:00
Vincent Ambo
d8583088b8 feat(tvl-kit): Expose //tools/checks in tvl-kit
This makes CI utility functions available in TVL kit. For now this is
only the Terraform check, but said check has come up in other repos
before so it's useful to centralise here (and we might add more!)

Change-Id: I18acb19fc3407650ab9bad53dfba022dda498c07
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5858
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: asmundo <asmundo@gmail.com>
2022-06-07 09:40:06 +00:00
Griffin Smith
e05e603201 docs(views/kit): mention magrathea
Change-Id: I3cf2d66fdc6c258ca9d3a502ce9eacc5926a8546
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5703
Autosubmit: grfn <grfn@gws.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-27 22:15:59 +00:00
Vincent Ambo
203a06390f feat(tvl-kit): Expose lazy-deps
This adds the //nix/lazy-deps tool at //lazy-deps in tvl-kit.

A CI step is added for the kit that uses this to lazily build an
example tool (magrathea).

Change-Id: Ibd6d69c83b87bd6e0766942d73297621f2593113
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5514
Tested-by: BuildkiteCI
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
2022-05-02 23:34:55 +00:00
Vincent Ambo
82ba42c439 feat(tvl-kit): add magrathea to TVL kit
this tool is generically useful for other TVL-like setups

Change-Id: I182259a7ddb61b4ebdce98ef7893a0ac58a6baec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5271
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
2022-02-14 10:47:17 +00:00
Vincent Ambo
3bde425860 refactor(nix): Move mkLabel from buildkite to readTree
This function is more generically useful than just for pipeline
construction.

A subsequent commit will use it inside of readTree itself.

Change-Id: I5eabd6f659726484667e060958865dddbc205762
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5237
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-02-07 15:13:52 +00:00
Vincent Ambo
49c8d8371c fix(views/kit): Export niv-pinned source hashes
These are required for standalone imports of the kit now.

Change-Id: Ie3c7218a606b1ba9cf274bb80b314a7889d8ede9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5189
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
2022-02-02 14:28:14 +00:00
Vincent Ambo
aa122cbae7 style: format entire depot with nixpkgs-fmt
This CL can be used to compare the style of nixpkgs-fmt against other
formatters (nixpkgs, alejandra).

Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: wpcarro <wpcarro@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: cynthia <cynthia@tvl.fyi>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: eta <tvl@eta.st>
Reviewed-by: grfn <grfn@gws.fyi>
2022-01-31 16:11:53 +00:00
Vincent Ambo
bbf4c06e96 feat(views/kit): Check Buildkite pipeline into repository
Change-Id: Id005703531ed3626c911b839d8f692f65a28e1e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5053
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-22 21:13:16 +00:00
Vincent Ambo
e1146601c1 feat(kit): Export TVL kit as a josh workspace
This creates a josh workspace called `views/kit` which exports all
dependencies needed by external users of the TVL kit.

The intention of this is to have a single clonable "virtual repo"
which provides everything needed to run a system like TVL, but without
the projects that we develop *in* TVL.

Right now this is limited to the basic Nix code (readTree, pipeline
generation) and things required for Gerrit integration.

The workspace maps depot paths into slightly different (simpler)
locations inside the exported view, to avoid a nested, mostly empty
structure.

Note: This is not an "external API" or some such of depot, it is
simply a convenience for exporting some of our tooling.

Change-Id: Ied24aaef117fc2e0c188ec742ae7cd993a5babd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4991
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-19 10:24:55 +00:00