tvl-depot/tvix/shell.nix
Vincent Ambo 609b68031b chore(3p/sources): bump channels & overlays (2024-09-01)
Included changes:

* users/aspen: explicitly use open-source nvidia driver

  This now has to be specified explicitly, otherwise evaluation fails with an
  error.
* users/aspen: nixfmt -> nixfmt-classic
* users/aspen: fixes for renamed packages & options
* users/tazjin: fixes for renamed packages & options
* 3p/overlays: remove cbtemulator patch (merged upstream)
* tvix/shell: remove unnecessary patches (merged upstream)
* 3p/rust-crates: mark libgit2_sys as broken
* users/Profpatsch: mark git-db as broken
* 3p/overlays: pick `mypaint` from stable channel
* tvix: fix comments that clippy doesn't like anymore
* tvix/glue: disable a misfiring clippy lint (applying its suggestion breaks
  code below)

Change-Id: I6d3fc027694bbe7425a2d25dc53d65467a44f3b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12403
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-05 20:56:31 +00:00

71 lines
2.2 KiB
Nix

# 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 { };
additionalOverlays = [
(self: super: {
# macFUSE bump containing fix for https://github.com/osxfuse/osxfuse/issues/974
# https://github.com/NixOS/nixpkgs/pull/320197
fuse =
if super.stdenv.isDarwin then
super.fuse.overrideAttrs
(old: rec {
version = "4.8.0";
src = super.fetchurl {
url = "https://github.com/osxfuse/osxfuse/releases/download/macfuse-${version}/macfuse-${version}.dmg";
hash = "sha256-ucTzO2qdN4QkowMVvC3+4pjEVjbwMsB0xFk+bvQxwtQ=";
};
}) else super.fuse;
})
];
})
, ...
}:
pkgs.mkShell {
name = "tvix-rust-dev-env";
packages = [
pkgs.buf-language-server
pkgs.cargo
pkgs.cargo-machete
pkgs.cargo-expand
pkgs.clippy
pkgs.d2
pkgs.evans
pkgs.fuse
pkgs.go
pkgs.grpcurl
pkgs.hyperfine
pkgs.mdbook
pkgs.mdbook-admonish
pkgs.mdbook-d2
pkgs.mdbook-plantuml
pkgs.nix_2_3 # b/313
pkgs.pkg-config
pkgs.rust-analyzer
pkgs.rustc
pkgs.rustfmt
pkgs.plantuml
pkgs.protobuf
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
# We need these two dependencies in the ambient environment to be able to
# `cargo build` on MacOS.
pkgs.libiconv
pkgs.buildPackages.darwin.apple_sdk.frameworks.Security
];
# Set TVIX_BENCH_NIX_PATH to a somewhat pinned nixpkgs path.
# This is for invoking `cargo bench` imperatively on the developer machine.
# For tvix benchmarking across longer periods of time (by CI), we probably
# should also benchmark with a more static nixpkgs checkout, so nixpkgs
# refactorings are not observed as eval perf changes.
shellHook = ''
export TVIX_BENCH_NIX_PATH=nixpkgs=${pkgs.path}
'';
}