nix: bump to bazel 7 (#59327)

Now that its landed on nixpkgs-unstable https://nixpk.gs/pr-tracker.html?pr=262152

## Test plan

`bazel version` shows 7.0.0
This commit is contained in:
Noah S-C 2024-01-04 13:43:37 +00:00 committed by GitHub
parent f6fadab934
commit bbc7affa15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1704008649,
"narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=",
"lastModified": 1704161960,
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7",
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
"type": "github"
},
"original": {

View File

@ -29,7 +29,7 @@ let
if [ "$1" == "configure" ]; then
exec env --unset=USE_BAZEL_VERSION ${pkgs.bazelisk}/bin/bazelisk "$@"
fi
exec ${pkgs.bazel_6}/bin/bazel "$@"
exec ${pkgs.bazel_7}/bin/bazel "$@"
'');
bazel-watcher = writeShellScriptBin "ibazel" ''
${lib.optionalString hostPlatform.isMacOS "unset CC CXX"}
@ -137,11 +137,11 @@ mkShell {
# Some of the bazel actions require some tools assumed to be in the PATH defined by the "strict action env" that we enable
# through --incompatible_strict_action_env. We can poke a custom PATH through with --action_env=PATH=$BAZEL_ACTION_PATH.
# See https://sourcegraph.com/github.com/bazelbuild/bazel@6.1.2/-/blob/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java?L532-547
BAZEL_ACTION_PATH = with pkgs; lib.makeBinPath [ bashInteractive stdenv.cc coreutils unzip zip curl gzip gnutar gnugrep gnused git patch openssh findutils perl python39 which ];
BAZEL_ACTION_PATH = with pkgs; lib.makeBinPath [ bashInteractive stdenv.cc coreutils unzip zip curl gzip gnutar gnugrep gnused git patch openssh findutils perl python39 which postgresql_13 ];
# bazel complains when the bazel version differs even by a patch version to whats defined in .bazelversion,
# so we tell it to h*ck off here.
# https://sourcegraph.com/github.com/bazelbuild/bazel@1a4da7f331c753c92e2c91efcad434dc29d10d43/-/blob/scripts/packages/bazel.sh?L23-28
USE_BAZEL_VERSION =
if hostPlatform.isMacOS then "" else pkgs.bazel_6.version;
if hostPlatform.isMacOS then "" else pkgs.bazel_7.version;
}