Skip to content

Commit

Permalink
Merge branch 'master' into cg/use_config_bazel_remote_cache_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 29, 2023
2 parents ba81083 + 3a8141a commit 45d2af8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
uses: cachix/install-nix-action@v24
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=./docs/nixpkgs.nix
- uses: ./.github/actions/configure_bazelrc
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=./nixpkgs.nix
- uses: ./.github/actions/configure_bazelrc
Expand Down
3 changes: 3 additions & 0 deletions tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ sh_test(
"@rules_nixpkgs_python//:srcs",
"@rules_nixpkgs_rust//:srcs",
],
# MacOS sandbox fails this test with the following error:
# sandbox-exec: sandbox_apply: Operation not permitted
tags = ["no-sandbox"],
)
13 changes: 9 additions & 4 deletions tests/test_invalid_nixpkgs_package.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

ln -s tests/invalid_nixpkgs_package/workspace.bazel WORKSPACE
ln -s tests/invalid_nixpkgs_package/nested-build.bazel BUILD
ln -s tests/invalid_nixpkgs_package/default.nix default.nix
ln -sf tests/invalid_nixpkgs_package/workspace.bazel WORKSPACE
ln -sf tests/invalid_nixpkgs_package/nested-build.bazel BUILD

# Create copy of default.nix as we will edit it below
cp tests/invalid_nixpkgs_package/default.nix default.nix

# We need to provide a `nixpkgs` to create an output store path which is
# a folder (because nixpkgs_package requires the output store path to
Expand All @@ -13,7 +15,10 @@ ln -s tests/invalid_nixpkgs_package/default.nix default.nix
# builder script of the `hello` derivation. Since building this
# derivation doesn't rely on `nixpkgs`, we can easily relocate the
# `/nix/store` path in the Bazel sandbox.
sed "s;COREUTILS-ABS-PATH;${PWD}/external/coreutils_static/bin/;g" -i default.nix
#
# NOTE: The MacOS version of sed does not like the -i flag to appear after the
# commands. Also, it requires a value for the suffix.
sed -i.bak "s;COREUTILS-ABS-PATH;${PWD}/external/coreutils_static/bin/;g" default.nix

# Bring a specific version of Nix which can be executed in the Bazel
# linux sandbox.
Expand Down

0 comments on commit 45d2af8

Please sign in to comment.