about summary refs log tree commit diff
path: root/views
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-07T03·40+0300
committerclbot <clbot@tvl.fyi>2023-10-07T05·47+0000
commit03fec0b3934004d743397347f6fb2a1322b4c46c (patch)
tree20d140ac2c62bfc1815f75c8b0a6bfcba82b1a01 /views
parent9019d8568e845afe9f2621bf3d5e1918a8ff5cf9 (diff)
refactor(tvix,views/tvix): move shell into separate file r/6721
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>
Diffstat (limited to 'views')
-rw-r--r--views/tvix/default.nix26
-rw-r--r--views/tvix/workspace.josh5
2 files changed, 4 insertions, 27 deletions
diff --git a/views/tvix/default.nix b/views/tvix/default.nix
deleted file mode 100644
index feee0f2222..0000000000
--- a/views/tvix/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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 { };
-  })
-, ...
-}:
-
-pkgs.mkShell {
-  name = "tvix-rust-dev-env";
-  packages = with pkgs; [
-    buf-language-server
-    cargo
-    clippy
-    evans
-    fuse
-    pkg-config
-    protobuf
-    rust-analyzer
-    rustc
-    rustfmt
-  ];
-}
diff --git a/views/tvix/workspace.josh b/views/tvix/workspace.josh
index e0b15c7f30..b4f6e3ce5b 100644
--- a/views/tvix/workspace.josh
+++ b/views/tvix/workspace.josh
@@ -2,4 +2,7 @@
     ::nixpkgs/
     ::sources/
 ]
-:/tvix
+
+::tvix:exclude[
+  ::tvix/default.nix
+]:/tvix