nixpkgs/pkgs/servers/http/envoy/0002-nixpkgs-use-system-Go.patch
2023-10-13 23:17:11 +00:00

79 lines
2.5 KiB
Diff

From 10e577a3c300f76ead5a5512f2fe970f12e46592 Mon Sep 17 00:00:00 2001
From: Luke Granger-Brown <git@lukegb.com>
Date: Fri, 12 May 2023 08:13:21 +0100
Subject: [PATCH 2/3] nixpkgs: use system Go
---
bazel/dependency_imports.bzl | 29 +----------------------------
bazel/repositories.bzl | 3 ---
2 files changed, 1 insertion(+), 31 deletions(-)
diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl
index b743a1936d..afa04ef5c0 100644
--- a/bazel/dependency_imports.bzl
+++ b/bazel/dependency_imports.bzl
@@ -18,7 +18,7 @@ load("@com_google_cel_cpp//bazel:deps.bzl", "parser_deps")
load("@com_github_chrusty_protoc_gen_jsonschema//:deps.bzl", protoc_gen_jsonschema_go_dependencies = "go_dependencies")
# go version for rules_go
-GO_VERSION = "1.18"
+GO_VERSION = "host"
JQ_VERSION = "1.6"
YQ_VERSION = "4.24.4"
@@ -27,7 +27,6 @@ def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, y
rules_foreign_cc_dependencies()
go_rules_dependencies()
go_register_toolchains(go_version)
- envoy_download_go_sdks(go_version)
gazelle_dependencies(go_sdk = "go_sdk")
apple_rules_dependencies()
pip_dependencies()
@@ -148,29 +147,3 @@ def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, y
)
protoc_gen_jsonschema_go_dependencies()
-
-def envoy_download_go_sdks(go_version):
- go_download_sdk(
- name = "go_linux_amd64",
- goos = "linux",
- goarch = "amd64",
- version = go_version,
- )
- go_download_sdk(
- name = "go_linux_arm64",
- goos = "linux",
- goarch = "arm64",
- version = go_version,
- )
- go_download_sdk(
- name = "go_darwin_amd64",
- goos = "darwin",
- goarch = "amd64",
- version = go_version,
- )
- go_download_sdk(
- name = "go_darwin_arm64",
- goos = "darwin",
- goarch = "arm64",
- version = go_version,
- )
diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl
index 71667227f7..b10a47d344 100644
--- a/bazel/repositories.bzl
+++ b/bazel/repositories.bzl
@@ -215,9 +215,6 @@ def _go_deps(skip_targets):
if "io_bazel_rules_go" not in skip_targets:
external_http_archive(
name = "io_bazel_rules_go",
- # TODO(wrowe, sunjayBhatia): remove when Windows RBE supports batch file invocation
- patch_args = ["-p1"],
- patches = ["@envoy//bazel:rules_go.patch"],
)
external_http_archive("bazel_gazelle")
--
2.42.0