Skip to content

Commit 47b83e0

Browse files
committed
Reference nixpkgs config from linux|macos-nixpkgs
1 parent 9ead9a7 commit 47b83e0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ test --test_env=LANG=C.UTF-8 --test_env=LOCALE_ARCHIVE
1212

1313
# Platform / Toolchain Selection
1414
# ------------------------------
15+
build:linux-nixpkgs --config=nixpkgs
16+
build:macos-nixpkgs --config=nixpkgs
1517
build:nixpkgs --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
1618
# Use this configuration when targeting Windows. Eventually this will
1719
# no longer be required:

.github/workflows/workflow.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ jobs:
2121
nix_path: nixpkgs=./nixpkgs/default.nix
2222
- name: Configure
2323
run: |
24-
[[ ${{ matrix.os }} == macos ]] && EXTRA_CONFIG=--config=macos-nixpkgs
24+
case ${{ matrix.os }} in
25+
macos) BUILD_CONFIG=macos-nixpkgs;;
26+
ubuntu) BUILD_CONFIG=linux-nixpkgs;;
27+
esac
2528
cat >.bazelrc.local <<EOF
2629
common --config=ci
27-
build --config=nixpkgs $EXTRA_CONFIG
30+
build --config=$BUILD_CONFIG
2831
EOF
2932
- name: Check Bazel version
3033
run: |

0 commit comments

Comments
 (0)