···99 1 file changed, 3 insertions(+), 3 deletions(-)
10101111diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl
1212-index 6904bc93bdda3ee2308f13d61e62295fa11d799b..e4574878a566cceb4dc2343f3cade0350ea5e5ff 100644
1212+index 1293e432c815071ed55721760e583ac0e9f40108..664f8c8e2bf4641e7862e9321fd6f91d162c3c17 100644
1313--- a/bazel/repository_locations.bzl
1414+++ b/bazel/repository_locations.bzl
1515-@@ -1465,8 +1465,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
1515+@@ -1528,8 +1528,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
1616 project_name = "Bazel rust rules",
1717 project_desc = "Bazel rust rules (used by Wasm)",
1818 project_url = "https://github.com/bazelbuild/rules_rust",
···2323 # Note: rules_rust should point to the releases, not archive to avoid the hassle of bootstrapping in crate_universe.
2424 # This is described in https://bazelbuild.github.io/rules_rust/crate_universe.html#setup, otherwise bootstrap
2525 # is required which in turn requires a system CC toolchains, not the bazel controlled ones.
2626-@@ -1477,7 +1477,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
2626+@@ -1540,7 +1540,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
2727 "dataplane_ext",
2828 ],
2929 extensions = ["envoy.wasm.runtime.wasmtime"],
+32-12
pkgs/by-name/en/envoy/package.nix
···11{
22 lib,
33- bazel_6,
33+ bazel_7,
44 bazel-gazelle,
55 buildBazelPackage,
66 fetchFromGitHub,
···1616 jdk,
1717 ninja,
1818 patchelf,
1919- python3,
1919+ python312,
2020 linuxHeaders,
2121 nixosTests,
2222 runCommandLocal,
···3434 # However, the version string is more useful for end-users.
3535 # These are contained in a attrset of their own to make it obvious that
3636 # people should update both.
3737- version = "1.34.2";
3838- rev = "c657e59fac461e406c8fdbe57ced833ddc236ee1";
3939- hash = "sha256-f9JsgHEyOg1ZoEb7d3gy3+qoovpA3oOx6O8yL0U8mhI=";
3737+ version = "1.35.1";
3838+ rev = "6e9539d0366baf85baf9acb3e618cb3384765f13";
3939+ hash = "sha256-c1c8j/BCRrvAEqjt4EQ/d7zsM1zUe4Qr5EHzpuGblIk=";
4040 };
41414242 # these need to be updated for any changes to fetchAttrs
4343 depsHash =
4444 {
4545- x86_64-linux = "sha256-CczmVD/3tWR3LygXc3cTAyrMPZUTajqtRew85wBM5mY=";
4646- aarch64-linux = "sha256-GemlfXHlaHPn1/aBxj2Ve9tuwsEdlQQCU1v57378Dgs=";
4545+ x86_64-linux = "sha256-E6yUSd00ngmjaMds+9UVZLtcYhzeS8F9eSIkC1mZSps=";
4646+ aarch64-linux = "sha256-ivboOrV/uORKVHRL3685aopcElGvzsxgVcUmYsBwzXY=";
4747 }
4848 .${stdenv.system} or (throw "unsupported system ${stdenv.system}");
49495050+ python3 = python312;
5151+5052in
5153buildBazelPackage rec {
5254 pname = "envoy";
5355 inherit (srcVer) version;
5454- bazel = bazel_6;
5656+ bazel = bazel_7;
55575658 src = applyPatches {
5759 src = fetchFromGitHub {
···9799 --replace-fail 'crate_universe_dependencies()' 'crate_universe_dependencies(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc")' \
98100 --replace-fail 'crates_repository(' 'crates_repository(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc",'
99101100100- # patch rules_rust for envoy specifics, but also to support old Bazel
101101- # (Bazel 6 doesn't have ctx.watch, but ctx.path is sufficient for our use)
102102+ # patch rules_rust for envoy specifics
102103 cp ${./rules_rust.patch} bazel/rules_rust.patch
103104 substituteInPlace bazel/repositories.bzl \
104104- --replace-fail ', "@envoy//bazel:rules_rust_ppc64le.patch"' ""
105105+ --replace-fail ', "@envoy//bazel:rules_rust_ppc64le.patch"' "" \
106106+ --replace-fail '"@envoy//bazel:emsdk.patch"' ""
105107106108 substitute ${./rules_rust_extra.patch} bazel/nix/rules_rust_extra.patch \
107109 --subst-var-by bash "$(type -p bash)"
···130132 postPatch = ''
131133 ${postPatch}
132134135135+ echo "common --repository_cache=\"$bazelOut/external/repository_cache\"" >> .bazelrc
136136+133137 substituteInPlace bazel/dependency_imports.bzl \
134138 --replace-fail 'crate_universe_dependencies(' 'crate_universe_dependencies(bootstrap=True, ' \
135139 --replace-fail 'crates_repository(' 'crates_repository(generator="@@cargo_bazel_bootstrap//:cargo-bazel", '
136140 '';
137141 preInstall = ''
142142+ mkdir $NIX_BUILD_TOP/empty
143143+ pushd $NIX_BUILD_TOP/empty
144144+ touch MODULE.bazel
145145+ # Unfortunately, we need to fetch a lot of irrelevant junk to make this work.
146146+ # This really bloats the size of the FOD.
147147+ # TODO: lukegb - figure out how to make this suck less.
148148+ bazel fetch --repository_cache="$bazelOut/external/repository_cache"
149149+ bazel sync --repository_cache="$bazelOut/external/repository_cache"
150150+ popd
151151+138152 # Strip out the path to the build location (by deleting the comment line).
139153 find $bazelOut/external -name requirements.bzl | while read requirements; do
140154 sed -i '/# Generated from /d' "$requirements"
···151165 $bazelOut/external/rules_rust/util/process_wrapper/private/process_wrapper.sh \
152166 $bazelOut/external/rules_rust/crate_universe/src/metadata/cargo_tree_rustc_wrapper.sh
153167154154- rm -r $bazelOut/external/go_sdk
155168 rm -r $bazelOut/external/local_jdk
156169 rm -r $bazelOut/external/bazel_gazelle_go_repository_tools/bin
157170···175188 dontUseCmakeConfigure = true;
176189 dontUseGnConfigure = true;
177190 dontUseNinjaInstall = true;
191191+ bazel = null;
178192 preConfigure = ''
193193+ echo "common --repository_cache=\"$bazelOut/external/repository_cache\"" >> .bazelrc
194194+ echo "common --repository_disable_download" >> .bazelrc
195195+179196 # Make executables work, for the most part.
180197 find $bazelOut/external -type f -executable | while read execbin; do
181198 file "$execbin" | grep -q ': ELF .*, dynamically linked,' || continue
···211228 removeLocalConfigCc = true;
212229 removeLocal = false;
213230 bazelTargets = [ "//source/exe:envoy-static" ];
231231+ bazelFlags = [
232232+ "--repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0"
233233+ ];
214234 bazelBuildFlags = [
215235 "-c opt"
216236 "--spawn_strategy=standalone"
-51
pkgs/by-name/en/envoy/rules_rust.patch
···5566Signed-off-by: Luke Granger-Brown <git@lukegb.com>
77---
88- cargo/private/cargo_bootstrap.bzl | 8 ++++----
99- crate_universe/extensions.bzl | 10 +++++-----
108 crate_universe/src/lockfile.rs | 4 ++--
119 rust/private/rustc.bzl | 4 ++--
1210 4 files changed, 13 insertions(+), 13 deletions(-)
13111414-diff --git cargo/private/cargo_bootstrap.bzl cargo/private/cargo_bootstrap.bzl
1515-index a8021c49d62037ef32c7c64d5bb4a5efe3a8b4aa..f63d7c23ae0bddc9f3fece347a3a2b5b0afe6d8d 100644
1616---- cargo/private/cargo_bootstrap.bzl
1717-+++ cargo/private/cargo_bootstrap.bzl
1818-@@ -173,13 +173,13 @@ def _detect_changes(repository_ctx):
1919- # 'consumed' which means changes to it will trigger rebuilds
2020-2121- for src in repository_ctx.attr.srcs:
2222-- repository_ctx.watch(src)
2323-+ repository_ctx.path(src)
2424-2525-- repository_ctx.watch(repository_ctx.attr.cargo_lockfile)
2626-- repository_ctx.watch(repository_ctx.attr.cargo_toml)
2727-+ repository_ctx.path(repository_ctx.attr.cargo_lockfile)
2828-+ repository_ctx.path(repository_ctx.attr.cargo_toml)
2929-3030- if repository_ctx.attr.cargo_config:
3131-- repository_ctx.watch(repository_ctx.attr.cargo_config)
3232-+ repository_ctx.path(repository_ctx.attr.cargo_config)
3333-3434- def _cargo_bootstrap_repository_impl(repository_ctx):
3535- # Pretend to Bazel that this rule's input files have been used, so that it will re-run the rule if they change.
3636-diff --git crate_universe/extensions.bzl crate_universe/extensions.bzl
3737-index a749b10c8d469bd316d78034059c94b1fd98dbef..8f8c84dac1ec330d5e8e6abbd930387cb6c9f29e 100644
3838---- crate_universe/extensions.bzl
3939-+++ crate_universe/extensions.bzl
4040-@@ -957,17 +957,17 @@ def _crate_impl(module_ctx):
4141- fail("Spec specified for repo {}, but the module defined repositories {}".format(repo, local_repos))
4242-4343- for cfg in mod.tags.from_cargo + mod.tags.from_specs:
4444-- # Preload all external repositories. Calling `module_ctx.watch` will cause restarts of the implementation
4545-+ # Preload all external repositories. Calling `module_ctx.path` will cause restarts of the implementation
4646- # function of the module extension when the file has changed.
4747- if cfg.cargo_lockfile:
4848-- module_ctx.watch(cfg.cargo_lockfile)
4949-+ module_ctx.path(cfg.cargo_lockfile)
5050- if cfg.lockfile:
5151-- module_ctx.watch(cfg.lockfile)
5252-+ module_ctx.path(cfg.lockfile)
5353- if cfg.cargo_config:
5454-- module_ctx.watch(cfg.cargo_config)
5555-+ module_ctx.path(cfg.cargo_config)
5656- if hasattr(cfg, "manifests"):
5757- for m in cfg.manifests:
5858-- module_ctx.watch(m)
5959-+ module_ctx.path(m)
6060-6161- cargo_path, rustc_path = _get_host_cargo_rustc(module_ctx, host_triple, cfg.host_tools_repo)
6262- cargo_bazel_fn = new_cargo_bazel_fn(
6312diff --git crate_universe/src/lockfile.rs crate_universe/src/lockfile.rs
6413index 3e0ce6265fda6fbdd9e3e989e3e4e4443b615b8c..0fafcea8fbc7a590676d34d2c4ca8c413b953955 100644
6514--- crate_universe/src/lockfile.rs