···175175 inherit sourceRoot;
176176177177 patches = [
178178- # TODO: Make GSON work,
179179- # In particular, our bazel build cannot emit MODULE.bazel.lock
180180- # it only produces an empty json object `{ }`.
181181- ./serialize_nulls.patch
182182-183183- # --extra_toolchains defined later should come before the ones defined earlier.
184184- # As-is, this patch also inverts the order of extra_toolchains lists, but it's just a hack
185185- ./extra_toolchains_precedence.patch
186186-187187- #./toolchain_better_debug.patch
188188- ./toolchain_group_debug.patch
189189-190178 # Remote java toolchains do not work on NixOS because they download binaries,
191179 # so we need to use the @local_jdk//:jdk
192180 # It could in theory be done by registering @local_jdk//:all toolchains,
···395383 -e "/bazel_build /a\ --java_runtime_version=local_jdk \\\\" \
396384 -e "/bazel_build /a\ --extra_toolchains=@bazel_tools//tools/jdk:all \\\\" \
397385398398- #-e "/bazel_build /a\ --action_env=NIX_CFLAGS_COMPILE=\"$NIX_CFLAGS_COMPILE\" \\\\" \
399399- #-e "/bazel_build /a\ --action_env=NIX_LDFLAGS=\"$NIX_LDFLAGS\" \\\\" \
400400- #-e "/bazel_build /a\ --host_action_env=NIX_CFLAGS_COMPILE=\"$NIX_CFLAGS_COMPILE\" \\\\" \
401401- #-e "/bazel_build /a\ --host_action_env=NIX_LDFLAGS=\"$NIX_LDFLAGS\" \\\\" \
402402-403386 # Also build parser_deploy.jar with bootstrap bazel
404387 # TODO: Turn into a proper patch
405388 sedVerbose compile.sh \
···506489 ${python3}/bin/python3 ./bazel_src/scripts/generate_fish_completion.py \
507490 --bazel=./bazel_src/output/bazel \
508491 --output=./bazel_src/output/bazel-complete.fish
509509-510510- #echo "Stage 3 - Generate parser_deploy.jar"
511511- # XXX: for now, build in the patched compile.sh script to get all the args right.
512512- ## need to change directory for bazel to find the workspace
513513- #cd ./bazel_src
514514- ## build execlog tooling
515515- #export HOME=$(mktemp -d)
516516- #./output/bazel build src/tools/execlog:parser_deploy.jar
517517- #cd -
518492519493 runHook postBuild
520494 '';