diff options
Diffstat (limited to 'pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix')
-rw-r--r-- | pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix index 15be7c533b917..15088ef84e6a0 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/tests.nix @@ -21,16 +21,18 @@ let testsDistDir = testsRepoCache; testsRepoCache = callPackage ./bazel-repository-cache.nix { - # We are somewhat lucky that bazel's own lockfile works for our tests. - # Use extraDeps if the tests need things that are not in that lockfile. - # But most test dependencies are bazel's builtin deps, so that at least aligns. + # Bazel builtin tools versions are hard-coded in bazel. If the project + # lockfile has not been generated by the same bazel version as this one + # then it may be missing depeendencies for builtin tools. Export + # dependencies from baazel itself here, and let projects also import their + # own if need be. It's just a symlinkJoin after all. See ./cpp-test.nix inherit lockfile; # Take all the rules_ deps, bazel_ deps and their transitive dependencies, # but none of the platform-specific binaries, as they are large and useless. requiredDepNamePredicate = name: - null == builtins.match ".*(macos|osx|linux|win|apple|android|maven).*" name - && null != builtins.match "(platforms|com_google_|protobuf|rules_|bazel_).*" name ; + null == builtins.match ".*(macos|osx|linux|win|android|maven).*" name + && null != builtins.match "(platforms|com_google_|protobuf|rules_|bazel_|apple_support).*" name; }; runLocal = name: attrs: script: @@ -131,9 +133,7 @@ let inherit Foundation; bazel = bazel_self; distDir = testsDistDir; - extraBazelArgs = '' - --noenable_bzlmod \ - ''; + extraBazelArgs = ""; }; in recurseIntoAttrs ( @@ -141,12 +141,13 @@ let # `extracted` doesn’t work on darwin shebang = callBazelTest ../shebang-test.nix (args // { inherit extracted; }); }) // { - bashTools = callBazelTest ../bash-tools-test.nix args; - cpp = callBazelTest ../cpp-test.nix args; - java = callBazelTest ../java-test.nix args; - pythonBinPath = callBazelTest ../python-bin-path-test.nix args; - protobuf = callBazelTest ./protobuf-test.nix (args // { repoCache = testsRepoCache; }); - }); + bashTools = callBazelTest ../bash-tools-test.nix args; + cpp = callBazelTest ./cpp-test.nix args; + java = callBazelTest ../java-test.nix args; + pythonBinPath = callBazelTest ../python-bin-path-test.nix args; + protobuf = callBazelTest ./protobuf-test.nix (args // { repoCache = testsRepoCache; }); + } + ); bazelWithNixHacks = bazel_self.override { enableNixHacks = true; }; |