Skip to content

Commit

Permalink
Merge branch 'master' into renovate/cachix-install-nix-action-26.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored May 10, 2024
2 parents c900d7b + 6f7de56 commit f215f40
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/nix-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:23.04
FROM ubuntu:lunar-20231128

RUN apt-get update -qq && \
apt-get install openssh-server curl xz-utils sudo locales ca-certificates -y && \
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
],
)

Expand Down
5 changes: 4 additions & 1 deletion core/nixpkgs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ def _nixpkgs_build_and_symlink(repository_ctx, nix_build_cmd, expr_args, build_f

# Build a forest of symlinks (like new_local_package() does) to the
# Nix store.
for target in find_children(repository_ctx, output_path):
targets = find_children(repository_ctx, output_path)
if not targets:
fail("It appears that your nix store may have a corrupt entry. Found empty directory: {}".format(output_path))
for target in targets:
basename = target.rpartition("/")[-1]
repository_ctx.symlink(target, basename)

Expand Down
5 changes: 4 additions & 1 deletion core/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ def find_children(repository_ctx, target_dir):
"-print0",
]
exec_result = execute_or_fail(repository_ctx, find_args)
return exec_result.stdout.rstrip("\000").split("\000")
if exec_result.stdout != "":
return exec_result.stdout.rstrip("\000").split("\000")
else:
return [] # Special case because splitting the empty string yields [""]

def default_constraints(repository_ctx):
"""Calculate the default CPU and OS constraints based on the host platform.
Expand Down
2 changes: 1 addition & 1 deletion examples/toolchains/cc_cross_osx_to_linux_amd64/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ load("@rules_oci//oci:pull.bzl", "oci_pull")

oci_pull(
name = "distroless_base",
digest = "sha256:ccaef5ee2f1850270d453fdf700a5392534f8d1a8ca2acda391fbb6a06b81c86",
digest = "sha256:786007f631d22e8a1a5084c5b177352d9dcac24b1e8c815187750f70b24a9fc6",
image = "gcr.io/distroless/base",
platforms = [
"linux/amd64",
Expand Down
6 changes: 3 additions & 3 deletions examples/toolchains/go/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
],
)

Expand Down
6 changes: 3 additions & 3 deletions testing/go-workspace/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
],
)

Expand Down
6 changes: 3 additions & 3 deletions toolchains/go/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996",
sha256 = "f74c98d6df55217a36859c74b460e774abc0410a47cc100d822be34d5f990f16",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.1/rules_go-v0.47.1.zip",
],
)

Expand Down

0 comments on commit f215f40

Please sign in to comment.