envoy: 1.34.2 -> 1.35.1

+48 -79
+4 -4
pkgs/by-name/en/envoy/0001-nixpkgs-use-system-Python.patch
··· 45 45 extra_pip_args = ["--require-hashes"], 46 46 ) 47 47 diff --git a/bazel/repositories_extra.bzl b/bazel/repositories_extra.bzl 48 - index 7a9d3bbb53b567a8f398abaefe5ff044056d4d21..a5b75718de667883824e4320e2d563830b02f5d2 100644 48 + index 84e2a69c092fa4c824401a52b2c39a49f83d0837..e5afd5743613ad5fdbf7b28a99b6d1b5902566ac 100644 49 49 --- a/bazel/repositories_extra.bzl 50 50 +++ b/bazel/repositories_extra.bzl 51 - @@ -3,19 +3,11 @@ load("@bazel_features//:deps.bzl", "bazel_features_deps") 52 - load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") 51 + @@ -4,19 +4,11 @@ load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_baze 53 52 load("@emsdk//:deps.bzl", emsdk_deps = "deps") 53 + load("@envoy_examples//bazel:env.bzl", "envoy_examples_env") 54 54 load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime/remote:crates.bzl", "crate_repositories") 55 55 -load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains") 56 56 +load("@rules_python//python:repositories.bzl", "py_repositories") ··· 69 69 ignore_root_user_error = False): 70 70 bazel_features_deps() 71 71 emsdk_deps() 72 - @@ -23,13 +15,6 @@ def envoy_dependencies_extra( 72 + @@ -24,13 +16,6 @@ def envoy_dependencies_extra( 73 73 crate_repositories() 74 74 py_repositories() 75 75
+2 -2
pkgs/by-name/en/envoy/0002-nixpkgs-use-system-Go.patch
··· 10 10 1 file changed, 1 insertion(+), 1 deletion(-) 11 11 12 12 diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl 13 - index aef33aa103dc1136e63e165fb9ee6a267f52ba54..c5aefca14b729b548c4e90857202eb82576b507d 100644 13 + index 4615eed5c9ade5279f8174cf1bd3987a8b2d52f1..10be4b0b3f65e486c1dc8419337a5cf823431774 100644 14 14 --- a/bazel/dependency_imports.bzl 15 15 +++ b/bazel/dependency_imports.bzl 16 - @@ -22,7 +22,7 @@ load("@rules_rust//rust:defs.bzl", "rust_common") 16 + @@ -24,7 +24,7 @@ load("@rules_rust//rust:defs.bzl", "rust_common") 17 17 load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set") 18 18 19 19 # go version for rules_go
+7 -7
pkgs/by-name/en/envoy/0003-nixpkgs-use-system-C-C-toolchains.patch
··· 10 10 1 file changed, 5 insertions(+), 1 deletion(-) 11 11 12 12 diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl 13 - index c5aefca14b729b548c4e90857202eb82576b507d..6938ce63abb53661e8d1fb71eaaab03ba0cc37c6 100644 13 + index 10be4b0b3f65e486c1dc8419337a5cf823431774..b0badb3ccab3b112043bd8616770f8014238d396 100644 14 14 --- a/bazel/dependency_imports.bzl 15 15 +++ b/bazel/dependency_imports.bzl 16 - @@ -30,7 +30,11 @@ YQ_VERSION = "4.24.4" 17 - BUF_VERSION = "v1.50.0" 18 - 19 - def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, yq_version = YQ_VERSION, buf_version = BUF_VERSION): 16 + @@ -38,7 +38,11 @@ def envoy_dependency_imports( 17 + yq_version = YQ_VERSION, 18 + buf_sha = BUF_SHA, 19 + buf_version = BUF_VERSION): 20 20 - rules_foreign_cc_dependencies() 21 21 + rules_foreign_cc_dependencies( 22 22 + register_default_tools=False, # no prebuilt toolchains 23 - + register_built_tools=False, # nor from source 24 - + register_preinstalled_tools=True, # use host tools (default) 23 + + register_built_tools=False, # nor from source 24 + + register_preinstalled_tools=True, # use host tools (default) 25 25 + ) 26 26 go_rules_dependencies() 27 27 go_register_toolchains(go_version)
+3 -3
pkgs/by-name/en/envoy/0004-nixpkgs-bump-rules_rust-to-0.60.0.patch
··· 9 9 1 file changed, 3 insertions(+), 3 deletions(-) 10 10 11 11 diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl 12 - index 6904bc93bdda3ee2308f13d61e62295fa11d799b..e4574878a566cceb4dc2343f3cade0350ea5e5ff 100644 12 + index 1293e432c815071ed55721760e583ac0e9f40108..664f8c8e2bf4641e7862e9321fd6f91d162c3c17 100644 13 13 --- a/bazel/repository_locations.bzl 14 14 +++ b/bazel/repository_locations.bzl 15 - @@ -1465,8 +1465,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( 15 + @@ -1528,8 +1528,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( 16 16 project_name = "Bazel rust rules", 17 17 project_desc = "Bazel rust rules (used by Wasm)", 18 18 project_url = "https://github.com/bazelbuild/rules_rust", ··· 23 23 # Note: rules_rust should point to the releases, not archive to avoid the hassle of bootstrapping in crate_universe. 24 24 # This is described in https://bazelbuild.github.io/rules_rust/crate_universe.html#setup, otherwise bootstrap 25 25 # is required which in turn requires a system CC toolchains, not the bazel controlled ones. 26 - @@ -1477,7 +1477,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( 26 + @@ -1540,7 +1540,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( 27 27 "dataplane_ext", 28 28 ], 29 29 extensions = ["envoy.wasm.runtime.wasmtime"],
+32 -12
pkgs/by-name/en/envoy/package.nix
··· 1 1 { 2 2 lib, 3 - bazel_6, 3 + bazel_7, 4 4 bazel-gazelle, 5 5 buildBazelPackage, 6 6 fetchFromGitHub, ··· 16 16 jdk, 17 17 ninja, 18 18 patchelf, 19 - python3, 19 + python312, 20 20 linuxHeaders, 21 21 nixosTests, 22 22 runCommandLocal, ··· 34 34 # However, the version string is more useful for end-users. 35 35 # These are contained in a attrset of their own to make it obvious that 36 36 # people should update both. 37 - version = "1.34.2"; 38 - rev = "c657e59fac461e406c8fdbe57ced833ddc236ee1"; 39 - hash = "sha256-f9JsgHEyOg1ZoEb7d3gy3+qoovpA3oOx6O8yL0U8mhI="; 37 + version = "1.35.1"; 38 + rev = "6e9539d0366baf85baf9acb3e618cb3384765f13"; 39 + hash = "sha256-c1c8j/BCRrvAEqjt4EQ/d7zsM1zUe4Qr5EHzpuGblIk="; 40 40 }; 41 41 42 42 # these need to be updated for any changes to fetchAttrs 43 43 depsHash = 44 44 { 45 - x86_64-linux = "sha256-CczmVD/3tWR3LygXc3cTAyrMPZUTajqtRew85wBM5mY="; 46 - aarch64-linux = "sha256-GemlfXHlaHPn1/aBxj2Ve9tuwsEdlQQCU1v57378Dgs="; 45 + x86_64-linux = "sha256-E6yUSd00ngmjaMds+9UVZLtcYhzeS8F9eSIkC1mZSps="; 46 + aarch64-linux = "sha256-ivboOrV/uORKVHRL3685aopcElGvzsxgVcUmYsBwzXY="; 47 47 } 48 48 .${stdenv.system} or (throw "unsupported system ${stdenv.system}"); 49 49 50 + python3 = python312; 51 + 50 52 in 51 53 buildBazelPackage rec { 52 54 pname = "envoy"; 53 55 inherit (srcVer) version; 54 - bazel = bazel_6; 56 + bazel = bazel_7; 55 57 56 58 src = applyPatches { 57 59 src = fetchFromGitHub { ··· 97 99 --replace-fail 'crate_universe_dependencies()' 'crate_universe_dependencies(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc")' \ 98 100 --replace-fail 'crates_repository(' 'crates_repository(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc",' 99 101 100 - # patch rules_rust for envoy specifics, but also to support old Bazel 101 - # (Bazel 6 doesn't have ctx.watch, but ctx.path is sufficient for our use) 102 + # patch rules_rust for envoy specifics 102 103 cp ${./rules_rust.patch} bazel/rules_rust.patch 103 104 substituteInPlace bazel/repositories.bzl \ 104 - --replace-fail ', "@envoy//bazel:rules_rust_ppc64le.patch"' "" 105 + --replace-fail ', "@envoy//bazel:rules_rust_ppc64le.patch"' "" \ 106 + --replace-fail '"@envoy//bazel:emsdk.patch"' "" 105 107 106 108 substitute ${./rules_rust_extra.patch} bazel/nix/rules_rust_extra.patch \ 107 109 --subst-var-by bash "$(type -p bash)" ··· 130 132 postPatch = '' 131 133 ${postPatch} 132 134 135 + echo "common --repository_cache=\"$bazelOut/external/repository_cache\"" >> .bazelrc 136 + 133 137 substituteInPlace bazel/dependency_imports.bzl \ 134 138 --replace-fail 'crate_universe_dependencies(' 'crate_universe_dependencies(bootstrap=True, ' \ 135 139 --replace-fail 'crates_repository(' 'crates_repository(generator="@@cargo_bazel_bootstrap//:cargo-bazel", ' 136 140 ''; 137 141 preInstall = '' 142 + mkdir $NIX_BUILD_TOP/empty 143 + pushd $NIX_BUILD_TOP/empty 144 + touch MODULE.bazel 145 + # Unfortunately, we need to fetch a lot of irrelevant junk to make this work. 146 + # This really bloats the size of the FOD. 147 + # TODO: lukegb - figure out how to make this suck less. 148 + bazel fetch --repository_cache="$bazelOut/external/repository_cache" 149 + bazel sync --repository_cache="$bazelOut/external/repository_cache" 150 + popd 151 + 138 152 # Strip out the path to the build location (by deleting the comment line). 139 153 find $bazelOut/external -name requirements.bzl | while read requirements; do 140 154 sed -i '/# Generated from /d' "$requirements" ··· 151 165 $bazelOut/external/rules_rust/util/process_wrapper/private/process_wrapper.sh \ 152 166 $bazelOut/external/rules_rust/crate_universe/src/metadata/cargo_tree_rustc_wrapper.sh 153 167 154 - rm -r $bazelOut/external/go_sdk 155 168 rm -r $bazelOut/external/local_jdk 156 169 rm -r $bazelOut/external/bazel_gazelle_go_repository_tools/bin 157 170 ··· 175 188 dontUseCmakeConfigure = true; 176 189 dontUseGnConfigure = true; 177 190 dontUseNinjaInstall = true; 191 + bazel = null; 178 192 preConfigure = '' 193 + echo "common --repository_cache=\"$bazelOut/external/repository_cache\"" >> .bazelrc 194 + echo "common --repository_disable_download" >> .bazelrc 195 + 179 196 # Make executables work, for the most part. 180 197 find $bazelOut/external -type f -executable | while read execbin; do 181 198 file "$execbin" | grep -q ': ELF .*, dynamically linked,' || continue ··· 211 228 removeLocalConfigCc = true; 212 229 removeLocal = false; 213 230 bazelTargets = [ "//source/exe:envoy-static" ]; 231 + bazelFlags = [ 232 + "--repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0" 233 + ]; 214 234 bazelBuildFlags = [ 215 235 "-c opt" 216 236 "--spawn_strategy=standalone"
-51
pkgs/by-name/en/envoy/rules_rust.patch
··· 5 5 6 6 Signed-off-by: Luke Granger-Brown <git@lukegb.com> 7 7 --- 8 - cargo/private/cargo_bootstrap.bzl | 8 ++++---- 9 - crate_universe/extensions.bzl | 10 +++++----- 10 8 crate_universe/src/lockfile.rs | 4 ++-- 11 9 rust/private/rustc.bzl | 4 ++-- 12 10 4 files changed, 13 insertions(+), 13 deletions(-) 13 11 14 - diff --git cargo/private/cargo_bootstrap.bzl cargo/private/cargo_bootstrap.bzl 15 - index a8021c49d62037ef32c7c64d5bb4a5efe3a8b4aa..f63d7c23ae0bddc9f3fece347a3a2b5b0afe6d8d 100644 16 - --- cargo/private/cargo_bootstrap.bzl 17 - +++ cargo/private/cargo_bootstrap.bzl 18 - @@ -173,13 +173,13 @@ def _detect_changes(repository_ctx): 19 - # 'consumed' which means changes to it will trigger rebuilds 20 - 21 - for src in repository_ctx.attr.srcs: 22 - - repository_ctx.watch(src) 23 - + repository_ctx.path(src) 24 - 25 - - repository_ctx.watch(repository_ctx.attr.cargo_lockfile) 26 - - repository_ctx.watch(repository_ctx.attr.cargo_toml) 27 - + repository_ctx.path(repository_ctx.attr.cargo_lockfile) 28 - + repository_ctx.path(repository_ctx.attr.cargo_toml) 29 - 30 - if repository_ctx.attr.cargo_config: 31 - - repository_ctx.watch(repository_ctx.attr.cargo_config) 32 - + repository_ctx.path(repository_ctx.attr.cargo_config) 33 - 34 - def _cargo_bootstrap_repository_impl(repository_ctx): 35 - # Pretend to Bazel that this rule's input files have been used, so that it will re-run the rule if they change. 36 - diff --git crate_universe/extensions.bzl crate_universe/extensions.bzl 37 - index a749b10c8d469bd316d78034059c94b1fd98dbef..8f8c84dac1ec330d5e8e6abbd930387cb6c9f29e 100644 38 - --- crate_universe/extensions.bzl 39 - +++ crate_universe/extensions.bzl 40 - @@ -957,17 +957,17 @@ def _crate_impl(module_ctx): 41 - fail("Spec specified for repo {}, but the module defined repositories {}".format(repo, local_repos)) 42 - 43 - for cfg in mod.tags.from_cargo + mod.tags.from_specs: 44 - - # Preload all external repositories. Calling `module_ctx.watch` will cause restarts of the implementation 45 - + # Preload all external repositories. Calling `module_ctx.path` will cause restarts of the implementation 46 - # function of the module extension when the file has changed. 47 - if cfg.cargo_lockfile: 48 - - module_ctx.watch(cfg.cargo_lockfile) 49 - + module_ctx.path(cfg.cargo_lockfile) 50 - if cfg.lockfile: 51 - - module_ctx.watch(cfg.lockfile) 52 - + module_ctx.path(cfg.lockfile) 53 - if cfg.cargo_config: 54 - - module_ctx.watch(cfg.cargo_config) 55 - + module_ctx.path(cfg.cargo_config) 56 - if hasattr(cfg, "manifests"): 57 - for m in cfg.manifests: 58 - - module_ctx.watch(m) 59 - + module_ctx.path(m) 60 - 61 - cargo_path, rustc_path = _get_host_cargo_rustc(module_ctx, host_triple, cfg.host_tools_repo) 62 - cargo_bazel_fn = new_cargo_bazel_fn( 63 12 diff --git crate_universe/src/lockfile.rs crate_universe/src/lockfile.rs 64 13 index 3e0ce6265fda6fbdd9e3e989e3e4e4443b615b8c..0fafcea8fbc7a590676d34d2c4ca8c413b953955 100644 65 14 --- crate_universe/src/lockfile.rs