Skip to content

Commit 600f299

Browse files
authored
Merge branch 'master' into renovate/flask-3.x-lockfile
2 parents cc610dd + 7e92788 commit 600f299

File tree

23 files changed

+99
-19
lines changed

23 files changed

+99
-19
lines changed

.github/workflows/workflow.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix:
2323
os:
2424
- ubuntu-latest
25-
- macos-12
25+
- macos-13
2626
bzlmodEnabled:
2727
- true
2828
- false
@@ -31,7 +31,7 @@ jobs:
3131
- false
3232
exclude:
3333
# skip nix remote jobs on MacOS
34-
- os: macos-12
34+
- os: macos-13
3535
withNixRemote: true
3636
runs-on: ${{ matrix.os }}
3737
steps:
@@ -76,7 +76,7 @@ jobs:
7676
matrix:
7777
os:
7878
- ubuntu-latest
79-
- macos-12
79+
- macos-13
8080
runs-on: ${{ matrix.os }}
8181
steps:
8282
- uses: actions/checkout@v4

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4949

5050
http_archive(
5151
name = "rules_proto",
52-
sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295",
53-
strip_prefix = "rules_proto-6.0.2",
54-
url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz",
52+
sha256 = "0e5c64a2599a6e26c6a03d6162242d231ecc0de219534c38cb4402171def21e8",
53+
strip_prefix = "rules_proto-7.0.2",
54+
url = "https://github.com/bazelbuild/rules_proto/releases/download/7.0.2/rules_proto-7.0.2.tar.gz",
5555
)
5656

5757
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")

core/.bazelignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bazel-*
1+
bazel-core
22
testing

core/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ bzl_library(
2626
srcs = [
2727
"nixpkgs.bzl",
2828
"util.bzl",
29+
"private/get_cpu_value.bzl",
2930
],
3031
deps = [
3132
":bazel_tools",

core/private/get_cpu_value.bzl

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
load("@bazel_skylib//lib:versions.bzl", "versions")
2+
3+
# see https://github.com/tweag/rules_nixpkgs/pull/613
4+
# taken from https://github.com/bazelbuild/rules_cc/blob/8395ec0172270f3bf92cd7b06c9b5b3f1f679e88/cc/private/toolchain/lib_cc_configure.bzl#L225
5+
def get_cpu_value(repository_ctx):
6+
"""Compute the cpu_value based on the OS name. Doesn't %-escape the result!
7+
8+
Args:
9+
repository_ctx: The repository context.
10+
Returns:
11+
One of (darwin, freebsd, x64_windows, ppc, s390x, arm, aarch64, k8, piii)
12+
"""
13+
os_name = repository_ctx.os.name
14+
arch = repository_ctx.os.arch
15+
if os_name.startswith("mac os"):
16+
# Check if we are on x86_64 or arm64 and return the corresponding cpu value.
17+
if arch == "aarch64":
18+
return "darwin_arm64"
19+
20+
# NOTE(cb) for backward compatibility return "darwin" for Bazel < 7 on x86_64
21+
if versions.is_at_least("7.0.0", versions.get()):
22+
return "darwin_x86_64"
23+
else:
24+
return "darwin"
25+
26+
if os_name.find("freebsd") != -1:
27+
return "freebsd"
28+
if os_name.find("openbsd") != -1:
29+
return "openbsd"
30+
if os_name.find("windows") != -1:
31+
if arch == "aarch64":
32+
return "arm64_windows"
33+
else:
34+
return "x64_windows"
35+
36+
if arch in ["power", "ppc64le", "ppc", "ppc64"]:
37+
return "ppc"
38+
if arch in ["s390x"]:
39+
return "s390x"
40+
if arch in ["mips64"]:
41+
return "mips64"
42+
if arch in ["riscv64"]:
43+
return "riscv64"
44+
if arch in ["arm", "armv7l"]:
45+
return "arm"
46+
if arch in ["aarch64"]:
47+
return "aarch64"
48+
return "k8" if arch in ["amd64", "x86_64", "x64"] else "piii"

core/util.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
load("@bazel_tools//tools/cpp:lib_cc_configure.bzl", "get_cpu_value")
21
load("@bazel_skylib//lib:paths.bzl", "paths")
32
load("@bazel_skylib//lib:versions.bzl", "versions")
3+
load("//:private/get_cpu_value.bzl", "get_cpu_value")
44

55
def fail_on_err(return_value, prefix = None):
66
"""Fail if the given return value indicates an error.

nixpkgs/nixpkgs.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ nixpkgs_package(
115115

116116
load("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_autoconf_impl")
117117
load(
118-
"@bazel_tools//tools/cpp:lib_cc_configure.bzl",
118+
"@rules_nixpkgs_core//:private/get_cpu_value.bzl",
119119
"get_cpu_value",
120120
)
121121
load(

testing/posix/WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ bazel_skylib_workspace()
3232

3333
http_archive(
3434
name = "rules_sh",
35-
sha256 = "23a4571ec8afc83db1eae99c0efd0b8b4fa1644069f0340a10f8859e086ba02c",
36-
strip_prefix = "rules_sh-0.4.0",
37-
urls = ["https://github.com/tweag/rules_sh/archive/v0.4.0.tar.gz"],
35+
sha256 = "f96b39c5a07d38424b48b5cc2e5f4b820f2877682a0488faa43f0948def95e28",
36+
strip_prefix = "rules_sh-0.5.0",
37+
urls = ["https://github.com/tweag/rules_sh/archive/v0.5.0.tar.gz"],
3838
)
3939

4040
load("@rules_sh//sh:repositories.bzl", "rules_sh_dependencies")

testing/python/.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bazel-python

toolchains/cc/cc.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ using `nixpkgs_cc_configure(..., cc_lang = "cuda")` or similar.
2323
load("@bazel_skylib//lib:sets.bzl", "sets")
2424
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
2525
load(
26-
"@bazel_tools//tools/cpp:lib_cc_configure.bzl",
26+
"@rules_nixpkgs_core//:private/get_cpu_value.bzl",
2727
"get_cpu_value",
28+
)
29+
load(
30+
"@bazel_tools//tools/cpp:lib_cc_configure.bzl",
2831
"get_starlark_list",
2932
"write_builtin_include_directory_paths",
3033
)

0 commit comments

Comments
 (0)