diff --git a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix index 8f775dd056a35..7de1ee8e072fa 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix @@ -678,6 +678,13 @@ stdenv.mkDerivation rec { # second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch} hello_test + ## Test that the GSON serialisation files are present + gson_classes=$(unzip -l $($out/bin/bazel info install_base)/A-server.jar | grep -F -c _GsonTypeAdapter.class) + if [ "$gson_classes" -lt 10 ]; then + echo "Missing GsonTypeAdapter classes in A-server.jar. Lockfile generation will not work" + exit 1 + fi + runHook postInstall '';