pinchflat: correct esbuild symlink name on Darwin
The tailwind and esbuild libraries expect different Darwin target names (`macos-*` and `darwin-*`), so each binary has to be symlinked under the name its own library looks for. The esbuild binary was instead symlinked under tailwind's `macos-*` name, so the esbuild library did not find it and fell back to downloading esbuild from npm at build time; that download fails in sandboxed and offline builds such as nixpkgs-review (no network or CA bundle). Assisted-by: Claude Code (Claude Opus 4.8)
This commit is contained in:
@@ -58,10 +58,13 @@ beamPackages.mixRelease rec {
|
||||
patchShebangs ~/assets/node_modules
|
||||
|
||||
# phoenixframework expects platform-specific tailwind/esbuild binaries in a specific location:
|
||||
# https://github.com/phoenixframework/tailwind/blob/194ab0f979782e4ccf2fe796042bf8e20967df93/lib/tailwind.ex#L243-L251
|
||||
targets="linux-x64 linux-arm64 macos-x64 macos-arm64"
|
||||
for target in $targets; do
|
||||
# tailwind: https://github.com/phoenixframework/tailwind/blob/194ab0f979782e4ccf2fe796042bf8e20967df93/lib/tailwind.ex#L243-L251
|
||||
for target in linux-x64 linux-arm64 macos-x64 macos-arm64; do
|
||||
ln -s "${tailwindcss}/bin/tailwindcss" "_build/tailwind-$target"
|
||||
done
|
||||
|
||||
# esbuild: https://github.com/phoenixframework/esbuild/blob/v0.10.0/lib/esbuild.ex#L270-L300
|
||||
for target in linux-x64 linux-arm64 darwin-x64 darwin-arm64; do
|
||||
ln -s "${esbuild}/bin/esbuild" "_build/esbuild-$target"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user