From aece643d1a6effa09ed2ee0ad00d8251f6ec944f Mon Sep 17 00:00:00 2001 From: Aleksander Gondek Date: Tue, 29 Mar 2022 17:05:54 +0200 Subject: [PATCH] [CI] MacOS nix installation: add settings --- .github/workflows/ci-bzl-projects.yaml | 2 ++ scripts/shell.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/ci-bzl-projects.yaml b/.github/workflows/ci-bzl-projects.yaml index b556b6e..ddd84bf 100644 --- a/.github/workflows/ci-bzl-projects.yaml +++ b/.github/workflows/ci-bzl-projects.yaml @@ -29,5 +29,7 @@ jobs: uses: cachix/install-nix-action@v15 with: nix_path: nixpkgs=channel:nixos-unstable + extra_nix_config: | + experimental-features = nix-command flakes - name: Build all run: ./nix-shell.sh -- --run 'cd projects/${{ matrix.project }}; bazel build //...' diff --git a/scripts/shell.sh b/scripts/shell.sh index bba51d2..3fe111c 100755 --- a/scripts/shell.sh +++ b/scripts/shell.sh @@ -115,6 +115,7 @@ verify_nix_daemon_config_compatibility() { # said logic. # Therefore "experimental-features = nix-command" are needed. + mkdir -p "${CACHE_ROOT}" # Why not $(nix show-config)? It fails with cryptic 'access-tokens: command not found' nix show-config --json > "${global_nix_conf_settings}" 2>/dev/null # shellcheck disable=SC2181