Skip to content

Commit

Permalink
Merge pull request #500 from tweag/philipp/nix_shell_refactor
Browse files Browse the repository at this point in the history
`nix-shell --pure`
  • Loading branch information
mergify[bot] authored Jul 8, 2024
2 parents f9a387a + c037f7a commit 3248507
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
continue
else
echo "::group::Running $example_name"
nix-shell --command 'bazel run --config=nix :hello'
nix-shell --pure --keep GITHUB_STEP_SUMMARY --keep GITHUB_REPOSITORY --keep BZLMOD_ENABLED --keep BAZEL_NIX_REMOTE --command 'bazel run --config=nix :hello'
# TODO: all toolchains should run without Nixpkgs
fi
popd
Expand Down
2 changes: 1 addition & 1 deletion examples/toolchains/cc/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.bazel_6 ]; }
pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.nix pkgs.bazel_6 ]; }
2 changes: 1 addition & 1 deletion examples/toolchains/cc_cross_osx_to_linux_amd64/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.bazel_6 ]; }
pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.nix pkgs.bazel_6 ]; }
2 changes: 1 addition & 1 deletion examples/toolchains/cc_with_deps/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.bazel_6 ]; }
pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.nix pkgs.bazel_6 ]; }
5 changes: 4 additions & 1 deletion examples/toolchains/go/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.bazel_6 ]; }
pkgs.mkShellNoCC {
nativeBuildInputs = [ pkgs.nix pkgs.bazel_6 ];
env.BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN = "1";
}
5 changes: 4 additions & 1 deletion examples/toolchains/java/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.bazel_6 ]; }
pkgs.mkShellNoCC {
nativeBuildInputs = [ pkgs.nix pkgs.bazel_6 ];
env.BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN = "1";
}
2 changes: 1 addition & 1 deletion examples/toolchains/nodejs/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = with pkgs; [ bazel_6 ]; }
pkgs.mkShellNoCC { nativeBuildInputs = with pkgs; [ nix bazel_6 ]; }
5 changes: 4 additions & 1 deletion examples/toolchains/python/shell.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{ pkgs ? import ./nixpkgs.nix { } }:

pkgs.mkShellNoCC { nativeBuildInputs = [ pkgs.bazel_6 ]; }
pkgs.mkShellNoCC {
nativeBuildInputs = [ pkgs.nix pkgs.bazel_6 ];
env.BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN = "1";
}
2 changes: 1 addition & 1 deletion examples/toolchains/rust/shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs ? import ./nixpkgs.nix { } }:
with pkgs;
mkShell {
nativeBuildInputs = [ bazel_6 git nix zlib libiconv ]
nativeBuildInputs = [ bazel_6 cacert git nix zlib libiconv ]
++ (lib.optional stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]);
}

0 comments on commit 3248507

Please sign in to comment.