From 2f60742cd4be2a8ed3957a143f2d50e0b4297424 Mon Sep 17 00:00:00 2001 From: Zakhar Date: Mon, 4 Aug 2025 12:26:27 +0000 Subject: [PATCH] Pick commit which uses github mirror and has LZMA config --- WORKSPACE.bazel | 2 +- bazel/BUILD.bazel | 1 + bazel/github_url_for_lzma.patch | 13 +++++++++++++ bazel/repos.bzl | 9 +++++++-- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 bazel/github_url_for_lzma.patch diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index a14d0a6..bdabe67 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -1,4 +1,4 @@ -workspace(name = "stout") +workspace(name = "com_github_3rdparty_stout") load("//bazel:repos.bzl", "repos") diff --git a/bazel/BUILD.bazel b/bazel/BUILD.bazel index e69de29..7e487ae 100644 --- a/bazel/BUILD.bazel +++ b/bazel/BUILD.bazel @@ -0,0 +1 @@ +exports_files(["github_url_for_lzma.patch"]) diff --git a/bazel/github_url_for_lzma.patch b/bazel/github_url_for_lzma.patch new file mode 100644 index 0000000..fae2525 --- /dev/null +++ b/bazel/github_url_for_lzma.patch @@ -0,0 +1,13 @@ +diff --git a/boost/boost.bzl b/boost/boost.bzl +index 8e7a820..5059d51 100644 +--- a/boost/boost.bzl ++++ b/boost/boost.bzl +@@ -139,7 +139,7 @@ def boost_deps(): + http_archive, + name = "org_lzma_lzma", + build_file = "@com_github_nelhage_rules_boost//:lzma.BUILD", +- url = "https://src.fedoraproject.org/lookaside/extras/xz/xz-5.4.6.tar.gz/sha512/b08a61d8d478d3b4675cb1ddacdbbd98dc6941a55bcdd81a28679e54e9367d3a595fa123ac97874a17da571c1b712e2a3e901c2737099a9d268616a1ba3de497/xz-5.4.6.tar.gz", ++ url = "https://github.com/tukaani-project/xz/releases/download/v5.4.6/xz-5.4.6.tar.gz", + sha256 = "aeba3e03bf8140ddedf62a0a367158340520f6b384f75ca6045ccc6c0d43fd5c", + strip_prefix = "xz-5.4.6", + ) diff --git a/bazel/repos.bzl b/bazel/repos.bzl index a765e2b..02946dc 100644 --- a/bazel/repos.bzl +++ b/bazel/repos.bzl @@ -44,9 +44,14 @@ def repos(external = True, repo_mapping = {}): maybe( git_repository, name = "com_github_nelhage_rules_boost", - commit = "c7188946ed60d0f637e0de9d1d0713cb7fa29e29", + # That is the last commit before the rules_boost repository was + # ported to use bzlmod, so we will apply a patch to use GitHub + # based url link for boost dependencies. + patches = ["@com_github_3rdparty_stout//bazel:github_url_for_lzma.patch"], + patch_args = ["-p1"], + commit = "5d04542e52164931841d06d5a6b3fd2f43c436d0", remote = "https://github.com/nelhage/rules_boost", - shallow_since = "1707638092 +0000", + shallow_since = "1715450458 +0200", ) maybe(