diff options
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/shell.nix | 5 | ||||
-rw-r--r-- | tvix/utils.nix | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tvix/shell.nix b/tvix/shell.nix index 0d5e2f27b5df..f3a4c946b39e 100644 --- a/tvix/shell.nix +++ b/tvix/shell.nix @@ -48,12 +48,13 @@ pkgs.mkShell { pkgs.mdbook-plantuml pkgs.nix_2_3 # b/313 pkgs.pkg-config - pkgs.runc 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. @@ -67,7 +68,7 @@ pkgs.mkShell { # should also benchmark with a more static nixpkgs checkout, so nixpkgs # refactorings are not observed as eval perf changes. shellHook = '' - export TVIX_BUILD_SANDBOX_SHELL=${pkgs.busybox-sandbox-shell}/bin/busybox + export TVIX_BUILD_SANDBOX_SHELL=${if pkgs.stdenv.isLinux then pkgs.busybox-sandbox-shell + "/bin/busybox" else "/bin/sh"} export TVIX_BENCH_NIX_PATH=nixpkgs=${pkgs.path} ''; } diff --git a/tvix/utils.nix b/tvix/utils.nix index 4a1fe4327029..f140728cad19 100644 --- a/tvix/utils.nix +++ b/tvix/utils.nix @@ -79,7 +79,7 @@ PROTO_ROOT = depot.tvix.build.protos.protos; nativeBuildInputs = [ pkgs.protobuf ]; buildInputs = lib.optional pkgs.stdenv.isDarwin commonDarwinDeps; - TVIX_BUILD_SANDBOX_SHELL = "${pkgs.pkgsStatic.busybox}/bin/sh"; + TVIX_BUILD_SANDBOX_SHELL = if pkgs.stdenv.isLinux then pkgs.pkgsStatic.busybox + "/bin/sh" else "/bin/sh"; }; tvix-castore = prev: { |