From dbabf728b71fd67bd92b63a2dd857b9cde8d3f1c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 1 Feb 2023 14:27:41 +0100 Subject: 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 Reviewed-by: tazjin Tested-by: BuildkiteCI --- views/tvix/default.nix | 36 ++++++++++++++++++++++++++++++++++++ views/tvix/workspace.josh | 5 +++++ 2 files changed, 41 insertions(+) create mode 100644 views/tvix/default.nix create mode 100644 views/tvix/workspace.josh (limited to 'views/tvix') diff --git a/views/tvix/default.nix b/views/tvix/default.nix new file mode 100644 index 000000000000..28e51c28b4c8 --- /dev/null +++ b/views/tvix/default.nix @@ -0,0 +1,36 @@ +# 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. +# +{ pkgs ? (import ./nixpkgs { + depotOverlays = false; + depot.third_party.sources = import ./sources { }; + }) +, ... +}: + +let + # `Call $methodName --bytes-as-base64` support for evans + evans = pkgs.evans.overrideAttrs (old: { + patches = old.patches or [ ] ++ [ + (pkgs.fetchpatch { + url = "https://github.com/ktr0731/evans/pull/611/commits/f2109627c0d20588980fe6fd6348d223dbdf7c33.patch"; + hash = "sha256-ff8drvAYwQvHeymaHEruvwDYynClpzPM5lrB7IeQHBs="; + }) + ]; + }); +in +pkgs.mkShell { + name = "tvix-rust-dev-env"; + packages = [ + pkgs.buf-language-server + pkgs.cargo + pkgs.clippy + pkgs.rust-analyzer + pkgs.rustc + pkgs.rustfmt + pkgs.protobuf + + evans + ]; +} diff --git a/views/tvix/workspace.josh b/views/tvix/workspace.josh new file mode 100644 index 000000000000..e0b15c7f30b5 --- /dev/null +++ b/views/tvix/workspace.josh @@ -0,0 +1,5 @@ +:/third_party:[ + ::nixpkgs/ + ::sources/ +] +:/tvix -- cgit 1.4.1