mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-12-05 04:10:19 +00:00
pomerium: 0.33.4 -> 0.34.2
Assisted-by: Antigravity (Gemini 4 Neon)
This commit is contained in:
@@ -1,200 +1,30 @@
|
||||
diff --git a/BUILD b/BUILD
|
||||
index 4c71dda..755d3b1 100644
|
||||
--- a/BUILD
|
||||
+++ b/BUILD
|
||||
@@ -2,9 +2,7 @@ load(
|
||||
"@envoy//bazel:envoy_build_system.bzl",
|
||||
"envoy_cc_binary",
|
||||
)
|
||||
-load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
|
||||
load("@rules_foreign_cc//foreign_cc:configure.bzl", "configure_make")
|
||||
-load("//bazel/ci/images:oci.bzl", "image")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -59,30 +57,6 @@ envoy_cc_binary(
|
||||
],
|
||||
)
|
||||
|
||||
-image(
|
||||
- name = "envoy.image",
|
||||
- srcs = [":envoy"],
|
||||
- repository = "ghcr.io/pomerium/envoy-custom-debug",
|
||||
-)
|
||||
-
|
||||
-image(
|
||||
- name = "envoy.stripped.image",
|
||||
- srcs = [":envoy.stripped"],
|
||||
- repository = "ghcr.io/pomerium/envoy-custom",
|
||||
-)
|
||||
-
|
||||
-image(
|
||||
- name = "envoy.static.image",
|
||||
- srcs = [":envoy.static"],
|
||||
- repository = "ghcr.io/pomerium/envoy-custom-static-debug",
|
||||
-)
|
||||
-
|
||||
-image(
|
||||
- name = "envoy.static.stripped.image",
|
||||
- srcs = [":envoy.static.stripped"],
|
||||
- repository = "ghcr.io/pomerium/envoy-custom-static",
|
||||
-)
|
||||
-
|
||||
configure_make(
|
||||
name = "openssh_config_h",
|
||||
autoreconf = True,
|
||||
@@ -111,12 +85,3 @@ configure_make(
|
||||
],
|
||||
)
|
||||
|
||||
-refresh_compile_commands(
|
||||
- name = "refresh_compile_commands",
|
||||
- exclude_headers = "external",
|
||||
- targets = {
|
||||
- "//:envoy": "",
|
||||
- "//test/...": "",
|
||||
- "//tools/...": "",
|
||||
- },
|
||||
-)
|
||||
diff --git a/WORKSPACE b/WORKSPACE
|
||||
index 65931b6..6067474 100644
|
||||
--- a/WORKSPACE
|
||||
+++ b/WORKSPACE
|
||||
@@ -2,31 +2,6 @@ workspace(name = "pomerium_envoy")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
-# Hedron's Compile Commands Extractor for Bazel
|
||||
-# https://github.com/hedronvision/bazel-compile-commands-extractor
|
||||
-http_archive(
|
||||
- name = "hedron_compile_commands",
|
||||
- sha256 = "e875b18876190b172ab59eaf193c2eec16fff8c46306c5eb0577ef7d1f8a65f7",
|
||||
- strip_prefix = "bazel-compile-commands-extractor-9f69112e3f61b9df76a8275085dabad36ef37c96",
|
||||
- url = "https://github.com/kralicky/bazel-compile-commands-extractor/archive/9f69112e3f61b9df76a8275085dabad36ef37c96.tar.gz",
|
||||
-)
|
||||
-
|
||||
-load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
|
||||
-
|
||||
-hedron_compile_commands_setup()
|
||||
-
|
||||
-load("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_setup_transitive")
|
||||
-
|
||||
-hedron_compile_commands_setup_transitive()
|
||||
-
|
||||
-load("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive")
|
||||
-
|
||||
-hedron_compile_commands_setup_transitive_transitive()
|
||||
-
|
||||
-load("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive_transitive")
|
||||
-
|
||||
-hedron_compile_commands_setup_transitive_transitive_transitive()
|
||||
-
|
||||
envoy_version = "4be7862a2a6d9a7867f576385d545bb0b47b9181" # v1.38.5
|
||||
|
||||
openssh_version = "V_10_3_P1"
|
||||
@@ -70,6 +45,7 @@ http_archive(
|
||||
],
|
||||
sha256 = "1b1c95003a057560451c545de8fb281040fd0b0a38387f0a461f1b018df715d2",
|
||||
strip_prefix = "envoy-" + envoy_version,
|
||||
+ patch_cmds = ["@patch_envoy_tree@ ."],
|
||||
url = "https://github.com/envoyproxy/envoy/archive/" + envoy_version + ".tar.gz",
|
||||
)
|
||||
|
||||
@@ -98,17 +74,6 @@ envoy_api_dependencies()
|
||||
|
||||
load("@envoy//bazel:repositories.bzl", "envoy_dependencies", "external_http_archive")
|
||||
|
||||
-external_http_archive(
|
||||
- name = "toolchains_llvm",
|
||||
- patch_args = ["-p1"],
|
||||
- patches = [
|
||||
- "@envoy//bazel:toolchains_llvm.patch",
|
||||
- "@envoy//bazel/foreign_cc:toolchains_llvm_stdc++.patch",
|
||||
- # linux->darwin cross-compile support
|
||||
- "//patches/toolchains_llvm:0002-darwin.patch",
|
||||
- ],
|
||||
-)
|
||||
-
|
||||
external_http_archive(
|
||||
name = "luajit",
|
||||
build_file = "//bazel/foreign_cc:luajit.BUILD",
|
||||
@@ -125,21 +90,6 @@ load("//bazel:repositories.bzl", "patch_antlr4_runtimes")
|
||||
|
||||
patch_antlr4_runtimes()
|
||||
|
||||
-http_archive(
|
||||
- name = "rules_oci",
|
||||
- sha256 = "6d47e0bb9d3c269695cbb35abb603d1db08434376a1210867da8f6f4a9c630ba",
|
||||
- strip_prefix = "rules_oci-" + rules_oci_version,
|
||||
- url = "https://github.com/bazel-contrib/rules_oci/releases/download/v" + rules_oci_version + "/rules_oci-v" + rules_oci_version + ".tar.gz",
|
||||
-)
|
||||
-
|
||||
-load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
|
||||
-
|
||||
-rules_oci_dependencies()
|
||||
-
|
||||
-load("@rules_oci//oci:repositories.bzl", "oci_register_toolchains")
|
||||
-
|
||||
-oci_register_toolchains(name = "oci")
|
||||
-
|
||||
load("@envoy//bazel:bazel_deps.bzl", "envoy_bazel_dependencies")
|
||||
|
||||
envoy_bazel_dependencies()
|
||||
@@ -160,26 +110,6 @@ load("@envoy//bazel:repo.bzl", "envoy_repo")
|
||||
|
||||
envoy_repo()
|
||||
|
||||
-load("//bazel:toolchains.bzl", "pomerium_envoy_toolchains")
|
||||
-
|
||||
-pomerium_envoy_toolchains()
|
||||
-
|
||||
-load("//bazel/sysroots:load_sysroots.bzl", "load_sysroots")
|
||||
-
|
||||
-load_sysroots()
|
||||
-
|
||||
-load("//bazel/cxx_libs:load_cxx_cross_libs.bzl", "load_cxx_cross_libs")
|
||||
-
|
||||
-load_cxx_cross_libs()
|
||||
-
|
||||
-load("//bazel/llvm_extras:load_llvm_extras.bzl", "load_llvm_extras")
|
||||
-
|
||||
-load_llvm_extras()
|
||||
-
|
||||
-load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
|
||||
-
|
||||
-llvm_register_toolchains()
|
||||
-
|
||||
envoy_http_archive(
|
||||
name = "openssh_portable",
|
||||
build_file = "//bazel/foreign_cc:openssh.BUILD",
|
||||
diff --git a/bazel/foreign_cc/luajit.bzl b/bazel/foreign_cc/luajit.bzl
|
||||
index e60afed..e9874c5 100644
|
||||
--- a/bazel/foreign_cc/luajit.bzl
|
||||
+++ b/bazel/foreign_cc/luajit.bzl
|
||||
@@ -75,3 +75,3 @@ def _get_host_platform():
|
||||
host_arch = "x64"
|
||||
- elif "@platforms//cpu:arm64" in HOST_CONSTRAINTS:
|
||||
+ elif "@platforms//cpu:arm64" in HOST_CONSTRAINTS or "@platforms//cpu:aarch64" in HOST_CONSTRAINTS:
|
||||
host_arch = "arm64"
|
||||
diff --git a/bazel/foreign_cc/openssh/include/config_linux/config.h b/bazel/foreign_cc/openssh/include/config_linux/config.h
|
||||
index a9c6142..0209f12 100644
|
||||
--- a/bazel/foreign_cc/openssh/include/config_linux/config.h
|
||||
+++ b/bazel/foreign_cc/openssh/include/config_linux/config.h
|
||||
@@ -1157,7 +1157,6 @@
|
||||
#define HAVE_RLIMIT_NPROC /**/
|
||||
|
||||
@@ -1159,3 +1159,2 @@
|
||||
/* Define to 1 if you have the <rpc/types.h> header file. */
|
||||
-#define HAVE_RPC_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `rresvport_af' function. */
|
||||
#define HAVE_RRESVPORT_AF 1
|
||||
diff --git a/envoy.bazelrc b/envoy.bazelrc
|
||||
index e87a20e..45d53cb 100644
|
||||
--- a/envoy.bazelrc
|
||||
+++ b/envoy.bazelrc
|
||||
@@ -98,8 +98,6 @@ build:macos --action_env=PATH=/opt/homebrew/bin:/opt/local/bin:/usr/local/bin:/u
|
||||
build:macos --host_action_env=PATH=/opt/homebrew/bin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin
|
||||
build:macos --define tcmalloc=disabled
|
||||
@@ -100,4 +100,2 @@ build:macos --define tcmalloc=disabled
|
||||
build:macos --cxxopt=-Wno-nullability-completeness
|
||||
-build:macos --@toolchains_llvm//toolchain/config:compiler-rt=false
|
||||
-build:macos --@toolchains_llvm//toolchain/config:libunwind=false
|
||||
|
||||
|
||||
#############################################################################
|
||||
@@ -108,16 +106,12 @@ build:macos --@toolchains_llvm//toolchain/config:libunwind=false
|
||||
|
||||
# Common flags for Clang (shared between all clang variants)
|
||||
@@ -110,7 +108,4 @@ build:macos --@toolchains_llvm//toolchain/config:libunwind=false
|
||||
common:clang-common --linkopt=-fuse-ld=lld
|
||||
-common:clang-common --@toolchains_llvm//toolchain/config:compiler-rt=false
|
||||
-common:clang-common --@toolchains_llvm//toolchain/config:libunwind=false
|
||||
@@ -202,93 +32,55 @@ index e87a20e..45d53cb 100644
|
||||
# Clang with libc++ (default)
|
||||
-common:clang --config=clang-common
|
||||
common:clang --config=libc++
|
||||
common:clang --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
||||
|
||||
@@ -119,3 +114,2 @@ common:clang --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
||||
# Clang installed to non-standard location (ie not /opt/llvm/)
|
||||
-common:clang-local --config=clang-common
|
||||
common:clang-local --config=libc++
|
||||
|
||||
# Use gold linker for gcc compiler.
|
||||
@@ -144,7 +138,6 @@ build:gcc --action_env=BAZEL_LINKOPTS=-lm:-fuse-ld=gold
|
||||
|
||||
# libc++ - default for clang
|
||||
@@ -146,3 +140,2 @@ build:gcc --action_env=BAZEL_LINKOPTS=-lm:-fuse-ld=gold
|
||||
common:libc++ --action_env=CXXFLAGS=-stdlib=libc++
|
||||
-common:libc++ --action_env=LDFLAGS="-stdlib=libc++ -fuse-ld=lld"
|
||||
common:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
|
||||
common:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a
|
||||
common:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread
|
||||
@@ -270,7 +263,6 @@ build:asan-common --build_tag_filters=-no_san
|
||||
build:asan-common --test_tag_filters=-no_san
|
||||
build:asan-common --copt -fsanitize=address,undefined
|
||||
@@ -272,3 +265,2 @@ build:asan-common --copt -fsanitize=address,undefined
|
||||
build:asan-common --linkopt -fsanitize=address,undefined
|
||||
-# vptr and function sanitizer are enabled in asan when using --config=clang.
|
||||
build:asan-common --copt -fno-sanitize=vptr,function
|
||||
build:asan-common --linkopt -fno-sanitize=vptr,function
|
||||
build:asan-common --copt -DADDRESS_SANITIZER=1
|
||||
@@ -463,21 +455,17 @@ build:docker-sandbox --experimental_docker_verbose
|
||||
build:docker-sandbox --experimental_enable_docker_sandbox
|
||||
|
||||
@@ -465,3 +457,2 @@ build:docker-sandbox --experimental_enable_docker_sandbox
|
||||
build:docker-clang --config=docker-sandbox
|
||||
-build:docker-clang --config=clang
|
||||
|
||||
build:docker-gcc --config=docker-sandbox
|
||||
build:docker-gcc --config=gcc
|
||||
|
||||
@@ -471,3 +462,2 @@ build:docker-gcc --config=gcc
|
||||
build:docker-asan --config=docker-sandbox
|
||||
-build:docker-asan --config=clang
|
||||
build:docker-asan --config=asan
|
||||
|
||||
@@ -475,3 +465,2 @@ build:docker-asan --config=asan
|
||||
build:docker-msan --config=docker-sandbox
|
||||
-build:docker-msan --config=clang
|
||||
build:docker-msan --config=msan
|
||||
|
||||
@@ -479,3 +468,2 @@ build:docker-msan --config=msan
|
||||
build:docker-tsan --config=docker-sandbox
|
||||
-build:docker-tsan --config=clang
|
||||
build:docker-tsan --config=tsan
|
||||
|
||||
|
||||
diff --git a/pomerium.bazelrc b/pomerium.bazelrc
|
||||
index 1392bb8..66558e0 100644
|
||||
index 436ac10..19208e1 100644
|
||||
--- a/pomerium.bazelrc
|
||||
+++ b/pomerium.bazelrc
|
||||
@@ -3,7 +3,6 @@ build:linux --copt="-Wno-error=unused-command-line-argument"
|
||||
# The quiche library is partially annotated for nullability.
|
||||
build --copt="-Wno-nullability-completeness"
|
||||
@@ -5,3 +5,2 @@ build --copt="-Wno-nullability-completeness"
|
||||
build --cxxopt=-std=c++23 --host_cxxopt=-std=c++23
|
||||
-build --config=clang
|
||||
|
||||
build:asan-common --test_env=UBSAN_SYMBOLIZER_PATH
|
||||
build:tsan --test_env=TSAN_SYMBOLIZER_PATH
|
||||
@@ -12,16 +11,11 @@ build:tsan --test_env=TSAN_SYMBOLIZER_PATH
|
||||
|
||||
# Force all cc targets built with the llvm toolchain to use compiler-rt and libunwind. This removes
|
||||
@@ -16,4 +15,2 @@ build --define=google_grpc=disabled
|
||||
# the dependency on libgcc.
|
||||
-common:clang-common --@toolchains_llvm//toolchain/config:compiler-rt=true
|
||||
-common:clang-common --@toolchains_llvm//toolchain/config:libunwind=true
|
||||
# Same as above, but applies to foreign_cc targets using autotools/cmake, which may not inherit the
|
||||
# link flags applied by the toolchain.
|
||||
# FIXME: this should not be necessary, but not having it breaks c-only foreign_cc dependencies
|
||||
# that use cmake. The c-only targets DO inherit flags from the toolchain's conly_flags option, but
|
||||
@@ -23,5 +20,2 @@ common:clang-common --@toolchains_llvm//toolchain/config:libunwind=true
|
||||
# that also breaks other C targets when set due to unused compiler flag errors.
|
||||
-common:libc++ --action_env=LDFLAGS="-stdlib=libc++ -fuse-ld=lld -rtlib=compiler-rt"
|
||||
-common:sanitizer --action_env=LDFLAGS="-stdlib=libc++ -fuse-ld=lld -rtlib=compiler-rt -l:libunwind.a"
|
||||
-common:coverage --action_env=LDFLAGS="-stdlib=libc++ -fuse-ld=lld -rtlib=compiler-rt -l:libunwind.a"
|
||||
|
||||
# Disable cgo. If cgo is enabled, some of the cc toolchain flags will propagate to the go toolchain,
|
||||
# which causes fPIC mismatch errors.
|
||||
diff --git a/bazel/foreign_cc/luajit.bzl b/bazel/foreign_cc/luajit.bzl
|
||||
--- a/bazel/foreign_cc/luajit.bzl
|
||||
+++ b/bazel/foreign_cc/luajit.bzl
|
||||
@@ -73,7 +73,7 @@ def _get_host_platform():
|
||||
|
||||
if "@platforms//cpu:x86_64" in HOST_CONSTRAINTS:
|
||||
host_arch = "x64"
|
||||
- elif "@platforms//cpu:arm64" in HOST_CONSTRAINTS:
|
||||
+ elif "@platforms//cpu:arm64" in HOST_CONSTRAINTS or "@platforms//cpu:aarch64" in HOST_CONSTRAINTS:
|
||||
host_arch = "arm64"
|
||||
else:
|
||||
fail("unknown host platform: %s" % HOST_CONSTRAINTS)
|
||||
diff --git a/source/common/apple.h b/source/common/apple.h
|
||||
index 9ad5e45..771cddd 100644
|
||||
--- a/source/common/apple.h
|
||||
+++ b/source/common/apple.h
|
||||
@@ -1,7 +1,2 @@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"hash": "sha256-xUFjxH7Gx8odF6uKLzT8kEVDrUeAiPLwuR1R79BZbV4=",
|
||||
"hash": "sha256-LwV82NqDnaksvOviv+sRMKlvREPXy4d4jxcK8DMP5Lg=",
|
||||
"entries": [
|
||||
{
|
||||
"sha256": "0485886f4d2aa3b666540e752d7a2e8eed9b79f6840f8f1cfad3b41f135cdb76",
|
||||
@@ -49,12 +49,6 @@
|
||||
"https://github.com/bazelbuild/rules_java/releases/download/7.12.5/rules_java-7.12.5.tar.gz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "1b1c95003a057560451c545de8fb281040fd0b0a38387f0a461f1b018df715d2",
|
||||
"urls": [
|
||||
"https://github.com/envoyproxy/envoy/archive/4be7862a2a6d9a7867f576385d545bb0b47b9181.tar.gz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "1e54959a3f3cb675938d858603ad69d0f3f7c82439fc2bf86d7232daec2bd10e",
|
||||
"urls": [
|
||||
@@ -241,12 +235,6 @@
|
||||
"https://github.com/mirror/tclap/archive/v1.2.5.tar.gz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec",
|
||||
"urls": [
|
||||
"https://github.com/google/brotli/archive/v1.2.0.tar.gz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "82363065ca2c978398d2307fe960c301a0b6655d55981fac017783bba22771d9",
|
||||
"urls": [
|
||||
@@ -307,6 +295,12 @@
|
||||
"https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.zip"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "aae3527bd1eeb596d1dbc994e3eb45b4df6d1c59666438400f09073b761fe913",
|
||||
"urls": [
|
||||
"https://github.com/google/brotli/archive/42a2ed4355bc6287da6bb6319f090b499cba4550.tar.gz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "aae608dfe8213dfd05d909a57718ef82f30722c392344583d3f39050c7f29a80",
|
||||
"urls": [
|
||||
@@ -390,6 +384,12 @@
|
||||
"urls": [
|
||||
"https://github.com/google/flatbuffers/archive/v25.12.19.tar.gz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"sha256": "f9c679f4e6b40eb3acdd864249b62c24da64be3bd7c02abf8be75d02f56ad415",
|
||||
"urls": [
|
||||
"https://github.com/envoyproxy/envoy/archive/17e27840396c1fa3196f184fcb5db1ab13850504.tar.gz"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
buildGo126Module,
|
||||
buildGo127Module,
|
||||
buildNpmPackage,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
@@ -20,14 +20,14 @@ let
|
||||
|
||||
pomerium-envoy = callPackage ./pomerium-envoy.nix { };
|
||||
|
||||
version = "0.33.4";
|
||||
version = "0.34.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pomerium";
|
||||
repo = "pomerium";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oXq7ZZt2DsgUEIB8BvxbTMWVUD5kaLgG8KssYYk8yQg=";
|
||||
hash = "sha256-CYeP8pxJSQLsiweurdug953G/BMtrP5IDdVDT/+f4LA=";
|
||||
};
|
||||
vendorHash = "sha256-CZGgCEUfUj2+7G9OpRrhJvZ3exFxAqWYsBmUd59pYPo=";
|
||||
vendorHash = "sha256-dBDsHFV+G32aAoj8pNPyC/AHu+teFmmkB+MaBOwTmDQ=";
|
||||
|
||||
# Needed because buildGoModule does not support go workspaces yet.
|
||||
# We use Go's workspace vendor command.
|
||||
@@ -41,7 +41,7 @@ let
|
||||
'';
|
||||
};
|
||||
in
|
||||
buildGo126Module (finalAttrs: {
|
||||
buildGo127Module (finalAttrs: {
|
||||
pname = "pomerium";
|
||||
inherit
|
||||
src
|
||||
@@ -57,7 +57,7 @@ buildGo126Module (finalAttrs: {
|
||||
inherit (finalAttrs) version;
|
||||
src = "${finalAttrs.src}/ui";
|
||||
|
||||
npmDepsHash = "sha256-Vag3gRsCMCMcf+aPE9MRLweZkiFsY6FjGdlkhgC1CBg=";
|
||||
npmDepsHash = "sha256-JdoPbA7FohM/siodHW9byymL9LRNu4iuNbVYB/i4bDo=";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
bazel_7,
|
||||
bazel-buildtools,
|
||||
cacert,
|
||||
cmake,
|
||||
envoy,
|
||||
@@ -26,7 +27,7 @@ let
|
||||
stdenvAdapters.useMoldLinker llvmPackages.libcxxStdenv
|
||||
else
|
||||
llvmPackages.libcxxStdenv;
|
||||
version = "1.37.0-rc3-unstable-2026-10-01";
|
||||
version = "1.37.0-rc3-unstable-2026-11-02";
|
||||
bazelCcCompiler =
|
||||
if stdenv.buildPlatform.isDarwin then
|
||||
if stdenv.buildPlatform.isAarch64 then "cc-compiler-darwin_arm64" else "cc-compiler-darwin_x86_64"
|
||||
@@ -38,8 +39,8 @@ let
|
||||
src = fetchFromGitHub {
|
||||
owner = "pomerium";
|
||||
repo = "envoy-custom";
|
||||
rev = "8b998d0f6ff30a8243296168125a783c35772141";
|
||||
hash = "sha256-xLekdqMJvveEuSil+WxFI91GAVE+NST+lFShf/ysm4U=";
|
||||
rev = "e7b75c3a606de275146897f0f787fe3cf80ead22";
|
||||
hash = "sha256-zL68YIgBuFQujtnbKVLU9lRlZ6B0FAeeMxk+IoIkzGY=";
|
||||
};
|
||||
|
||||
patchEnvoyTree = writeShellScript "patch-envoy-tree" ''
|
||||
@@ -121,6 +122,7 @@ let
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
bazel-buildtools
|
||||
cmake
|
||||
gn
|
||||
jdk21_headless
|
||||
@@ -191,6 +193,35 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
JAVA_HOME = jdk21_headless.home;
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
# Drop OCI image and compile_commands targets from BUILD (not needed for the envoy binary).
|
||||
buildozer 'delete' \
|
||||
//:%image \
|
||||
//:%refresh_compile_commands
|
||||
buildozer 'fix unusedLoads' //:__pkg__
|
||||
|
||||
# Drop hermetic LLVM/sysroot toolchains, OCI rules, and compile_commands from WORKSPACE.
|
||||
buildozer 'delete' \
|
||||
//WORKSPACE:hedron_compile_commands \
|
||||
//WORKSPACE:toolchains_llvm \
|
||||
//WORKSPACE:rules_oci \
|
||||
//WORKSPACE:oci \
|
||||
//WORKSPACE:%rules_oci_dependencies \
|
||||
//WORKSPACE:%pomerium_envoy_toolchains \
|
||||
//WORKSPACE:%load_sysroots \
|
||||
//WORKSPACE:%load_cxx_cross_libs \
|
||||
//WORKSPACE:%load_llvm_extras \
|
||||
//WORKSPACE:%llvm_register_toolchains
|
||||
buildozer 'print kind' //WORKSPACE:all \
|
||||
| sed -n 's/^hedron_.*/\/\/WORKSPACE:%&/p' \
|
||||
| xargs buildozer 'delete'
|
||||
buildozer 'fix unusedLoads' //WORKSPACE:__pkg__
|
||||
|
||||
# Patch the upstream @envoy archive during Bazel fetch and drop the incompatible luajit patch.
|
||||
buildozer 'add patch_cmds ${patchEnvoyTree}' //WORKSPACE:envoy
|
||||
buildozer 'remove patches //patches/luajit:0001-libunwind-fde-offset.patch' //WORKSPACE:luajit
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
rm -f .bazelversion
|
||||
echo "${src.rev}" > SOURCE_VERSION
|
||||
@@ -202,10 +233,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ln -sf "${protoc-gen-validate}/bin/protoc-gen-validate" bazel/nix/protoc-gen-validate
|
||||
ln -sf "${yq-go}/bin/yq" bazel/nix/yq
|
||||
ln -sf "${jq}/bin/jq" bazel/nix/jq
|
||||
|
||||
substituteInPlace WORKSPACE \
|
||||
--subst-var-by patch_envoy_tree "${patchEnvoyTree}" \
|
||||
--replace-fail '"//patches/luajit:0001-libunwind-fde-offset.patch",' ""
|
||||
'';
|
||||
|
||||
preBuildPhases = [ "preBuildPhase" ];
|
||||
|
||||
Reference in New Issue
Block a user