Commit 4399b94
committed
Re-enable the Nix flake on aarch64-darwin.
PR #3422 added the flake but bailed out on Darwin pending a fix for
"could not find native static library `rusty_v8`". With v8 now on
145.0.0 (PR #4073) the build itself works on aarch64-darwin, so this
removes the `builtins.abort` guard and fills in the real sha256 for the
v145.0.0 rusty_v8 archive on aarch64-darwin.
The underlying bug — v8s build.rs writing `librusty_v8.a` outside the
locations cargo and crane treat as authoritative — already has a known
workaround in PR #3921, but that fix only lives in
`.github/workflows/ci.yml` and so does not protect the Nix build. This
ports the equivalent guard into the flake as a `preBuild` on
`commonArgs`: if the v8 build directory exists but `librusty_v8.a` is
missing, clean and rebuild just the v8 crate. With current
nixpkgs/crane the file does in fact survive the `buildDepsOnly` →
`buildPackage` handoff on aarch64-darwin, so the guard no-ops on the
happy path; it is defence-in-depth for the next time crane or nixpkgs
shifts.
x86_64-darwin and aarch64-linux still use placeholder hashes; users on
those platforms will continue to hit the existing fail-then-paste-hash
loop documented in `librusty_v8.nix`.
# API and ABI breaking changes
None. Build-system only, no runtime change.
# Expected complexity level and risk
1.
# Testing
- [x] `nix flake check --no-build` passes on aarch64-darwin.
- [x] `nix build .#default` produces working `spacetime`,
`spacetimedb-cli`, and `spacetimedb-standalone` binaries; all three
report `spacetimedb tool version 2.3.0`.
- [x] `nix build .#checks.aarch64-darwin.workspace-fmt` passes.
- [x] `nix develop --command rustc --version` succeeds (the command
originally reported failing before this change).
- [ ] Confirmation from a reviewer with x86_64-linux that the change
has not regressed the previously working platform.1 parent 0305a24 commit 4399b94
2 files changed
Lines changed: 34 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
47 | 38 | | |
48 | 39 | | |
49 | 40 | | |
| |||
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
88 | 107 | | |
89 | 108 | | |
90 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
0 commit comments