Skip to content

Commit 813f845

Browse files
committed
fix: build x86_64-darwin with rosetta
Signed-off-by: Leo Moser <[email protected]>
1 parent d4f636d commit 813f845

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,34 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os:
12-
[
11+
os: [
1312
{
1413
name: "Ubuntu 24.04",
1514
family: "linux",
1615
runner: "ubuntu-24.04",
1716
archs: "x86_64",
17+
nix_double: "x86_64-linux",
1818
},
1919
{
2020
name: "Ubuntu 22.04",
2121
family: "linux",
2222
runner: "ubuntu-22.04-arm",
2323
archs: "aarch64",
24+
nix_double: "aarch64-linux",
2425
},
2526
{
2627
name: "macOS 15",
2728
family: "macos",
28-
runner: "macos-15-intel",
29+
runner: "macos-15", # with rosetta
2930
archs: "x86_64",
31+
nix_double: "x86_64-linux",
3032
},
3133
{
3234
name: "macOS 15",
3335
family: "macos",
3436
runner: "macos-15",
3537
archs: "arm64",
38+
nix_double: "aarch64-linux",
3639
},
3740
]
3841
name: Nix Builds | ${{ matrix.os.name }} | ${{ matrix.os.archs }}
@@ -48,7 +51,7 @@ jobs:
4851
- id: enumerate_packages
4952
name: Get all packages
5053
run: |
51-
echo "FLAKE_OUTPUTS=$(python3 ./.github/workflows/get_all_packages.py | tr '\n' ' ')" >> $GITHUB_ENV
54+
echo "FLAKE_OUTPUTS=$(python3 ./.github/workflows/get_all_packages.py ${{ matrix.os.nix_double }} | tr '\n' ' ')" >> $GITHUB_ENV
5255
- name: Build All
5356
run: |
5457
set +e

.github/workflows/get_all_packages.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ def run(purpose, *args):
1717
exit(-1)
1818
return process.stdout
1919

20+
system = tuple()
21+
if len(sys.argv) > 1:
22+
system = ("--system", sys.argv[1])
2023

21-
flake_meta = json.load(run("get flake metadata", "nix", "flake", "show", "--json"))
24+
flake_meta = json.load(run("get flake metadata", "nix", "flake", "show", *system, "--json"))
2225
packages = flake_meta["packages"]
2326
for platform, packages in packages.items():
2427
for package, package_info in packages.items():

0 commit comments

Comments
 (0)