about summary refs log tree commit diff
path: root/tvix/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/shell.nix')
-rw-r--r--tvix/shell.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/tvix/shell.nix b/tvix/shell.nix
new file mode 100644
index 000000000000..1a7e9ddd2b56
--- /dev/null
+++ b/tvix/shell.nix
@@ -0,0 +1,33 @@
+# This file is shell.nix in the tvix josh workspace,
+# *and* used to provide the //tvix:shell attribute in a full depot checkout.
+# Hence, it may not use depot as a toplevel argument.
+
+{
+  # This falls back to the tvix josh workspace-provided nixpkgs checkout.
+  # In the case of depot, it's always set explicitly.
+  pkgs ? (import ./nixpkgs {
+    depotOverlays = false;
+    depot.third_party.sources = import ./sources { };
+  })
+, ...
+}:
+
+let
+  iconvDarwinDep = pkgs.lib.optionals pkgs.stdenv.isDarwin [ pkgs.libiconv ];
+in
+pkgs.mkShell {
+  name = "tvix-rust-dev-env";
+  packages = [
+    pkgs.buf-language-server
+    pkgs.cargo
+    pkgs.cargo-machete
+    pkgs.clippy
+    pkgs.evans
+    pkgs.fuse
+    pkgs.pkg-config
+    pkgs.rust-analyzer
+    pkgs.rustc
+    pkgs.rustfmt
+    pkgs.protobuf
+  ] ++ iconvDarwinDep;
+}