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>
This commit is contained in:
Vincent Ambo 2022-01-18 18:33:05 +03:00 committed by tazjin
parent 14d1ba8311
commit e1146601c1
5 changed files with 57 additions and 0 deletions

19
views/kit/default.nix Normal file
View file

@ -0,0 +1,19 @@
# Externally importable TVL depot stack. This is intended to be called
# with a supplied package set, otherwise the package set currently in
# use by the TVL depot will be used.
#
# For now, readTree is not used inside of this configuration to keep
# it simple. Adding it may be useful if we set up test scaffolding
# around the exported workspace.
{ pkgs ? import ./nixpkgs { depotOverlays = false; }, ... }:
pkgs.lib.fix(self: {
buildGo = import ./buildGo { inherit pkgs; };
buildkite = import ./buildkite { inherit pkgs; };
readTree = import ./readTree { };
besadii = import ./besadii {
depot.nix.buildGo = self.buildGo;
};
})