chore(snix): s/tvix/snix/
Change-Id: Iae961416eea0a38bc57df7b736f6dda5903b0828
This commit is contained in:
parent
768f053416
commit
36e4d017f5
1417 changed files with 3741 additions and 3650 deletions
79
snix/shell.nix
Normal file
79
snix/shell.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# This file is shell.nix in the snix josh workspace,
|
||||
# *and* used to provide the //snix:shell attribute in a full depot checkout.
|
||||
# Hence, it may not use depot as a toplevel argument.
|
||||
|
||||
{
|
||||
# This falls back to the snix 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;
|
||||
})
|
||||
];
|
||||
})
|
||||
, withIntegration ? false
|
||||
, ...
|
||||
}:
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "snix-rust-dev-env";
|
||||
packages = [
|
||||
pkgs.buf
|
||||
pkgs.cargo
|
||||
pkgs.cargo-machete
|
||||
pkgs.cargo-expand
|
||||
pkgs.cargo-flamegraph
|
||||
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.isLinux [
|
||||
pkgs.runc
|
||||
] ++ 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
|
||||
] ++ pkgs.lib.optionals withIntegration [
|
||||
pkgs.cbtemulator
|
||||
pkgs.google-cloud-bigtable-tool
|
||||
];
|
||||
|
||||
# Set SNIX_BENCH_NIX_PATH to a somewhat pinned nixpkgs path.
|
||||
# This is for invoking `cargo bench` imperatively on the developer machine.
|
||||
# For snix 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 SNIX_BUILD_SANDBOX_SHELL=${if pkgs.stdenv.isLinux then pkgs.busybox-sandbox-shell + "/bin/busybox" else "/bin/sh"}
|
||||
export SNIX_BENCH_NIX_PATH=nixpkgs=${pkgs.path}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue