about summary refs log tree commit diff
path: root/views/kit
diff options
context:
space:
mode:
Diffstat (limited to 'views/kit')
-rw-r--r--views/kit/README.md25
-rw-r--r--views/kit/buildkite.yml16
-rw-r--r--views/kit/default.nix31
-rw-r--r--views/kit/workspace.josh13
4 files changed, 85 insertions, 0 deletions
diff --git a/views/kit/README.md b/views/kit/README.md
new file mode 100644
index 0000000000..c7319ef419
--- /dev/null
+++ b/views/kit/README.md
@@ -0,0 +1,25 @@
+The TVL Kit
+===========
+
+[![Build status](https://badge.buildkite.com/cd7240a881c7e77c3ed8cc040f81734623f57038563b37213d.svg?branch=canon)](https://buildkite.com/tvl/tvl-kit)
+
+This folder contains a publicly available version of the core TVL
+tooling, currently comprising of:
+
+* `buildkite`: TVL tooling for dynamically generating Buildkite
+  pipelines with Nix.
+* `buildGo`: Nix-based build system for Go.
+* `readTree`: Nix library to dynamically compute attribute trees
+  corresponding to the physical layout of a repository.
+* `besadii`: Configurable Gerrit/Buildkite integration hook.
+* `magrathea`: Command-line tool for working with TVL-style monorepos
+
+It can be accessed via git by cloning it as such:
+
+    git clone https://code.tvl.fyi/depot.git:workspace=views/kit.git tvl-kit
+
+If you are looking at this within the TVL depot, you can see the
+[josh][] configuration in `workspace.josh`. You will find the projects
+at slightly different paths within the depot.
+
+[josh]: https://github.com/josh-project/josh/
diff --git a/views/kit/buildkite.yml b/views/kit/buildkite.yml
new file mode 100644
index 0000000000..0bba63726d
--- /dev/null
+++ b/views/kit/buildkite.yml
@@ -0,0 +1,16 @@
+# Build pipeline for the filtered //views/kit workspace of depot. This
+# pipeline is triggered by each build of canon.
+#
+# Pipeline status is visible on https://buildkite.com/tvl/tvl-kit
+
+steps:
+  - command: "nix-build --no-out-link -A besadii"
+    label: ":nix: besadii"
+
+  - command: "nix-build --no-out-link -A magrathea"
+    label: ":nix: magrathea"
+
+  - label: ":nix: lazy-deps"
+    command: |
+      nix-build -E 'with import ./. {}; lazy-deps { mg.attr = "magrathea"; }'
+      result/bin/mg
diff --git a/views/kit/default.nix b/views/kit/default.nix
new file mode 100644
index 0000000000..47c6088a46
--- /dev/null
+++ b/views/kit/default.nix
@@ -0,0 +1,31 @@
+# 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;
+    depot.third_party.sources = import ./sources { };
+  })
+, ...
+}:
+
+pkgs.lib.fix (self: {
+  besadii = import ./besadii {
+    depot.nix.buildGo = self.buildGo;
+  };
+
+  buildGo = import ./buildGo { inherit pkgs; };
+
+  buildkite = import ./buildkite {
+    inherit pkgs;
+    depot.nix.readTree = self.readTree;
+  };
+
+  lazy-deps = import ./lazy-deps { inherit pkgs; };
+  magrathea = import ./magrathea { inherit pkgs; };
+  readTree = import ./readTree { };
+})
diff --git a/views/kit/workspace.josh b/views/kit/workspace.josh
new file mode 100644
index 0000000000..bdf5503397
--- /dev/null
+++ b/views/kit/workspace.josh
@@ -0,0 +1,13 @@
+::LICENSE
+besadii = :/ops/besadii
+:/nix:[
+    ::buildGo/
+    ::buildkite/
+    ::lazy-deps/
+    ::readTree/
+]
+:/third_party:[
+    ::nixpkgs/
+    ::sources/
+]
+magrathea = :/tools/magrathea