Etapa G: nu/nushell al corpus (153→154) — el giant más duro, sellado
nushell 0.104.1: uno de los paquetes más duros del ecosistema (openssl-sys + libgit2-sys + libssh2-sys + libsqlite3-sys + mimalloc, todos sus C vendoreados). Fix clave: convertir la receta del estilo abuild (fase compile custom, que NO monta el wrapper .hammer-zig-cc) al build POR DEFECTO (flags=['--bin','nu']) ⇒ el wrapper traduce el target alpine→musl que zig no conoce, y los -sys compilan. Dropea system-deps.patch (vendor todo). mise diferido (.deferred: su build.rs busca git/archivo en build-time). HALLAZGO GENERAL: recetas import-Alpine con fase abuild + C-deps fallan porque la fase custom no monta el wrapper zig-cc. Fix = usar el build por defecto (sin fase compile). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -16,31 +16,14 @@ sha256 = "3dafca8bf892f5a2afaac1122a88a7eb7f22a0b62ef901f550173a11d5cbdf6e"
|
||||
compiler = "zig-cc"
|
||||
target = "x86_64-linux-musl"
|
||||
link = "static"
|
||||
flags = []
|
||||
# --bin nu: solo el shell (no los plugins del workspace, que multiplican el build). SIN fase compile
|
||||
# custom ⇒ usa el build por defecto del lab, que MONTA el wrapper .hammer-zig-cc (traduce el target
|
||||
# alpine→musl que zig no conoce). La fase abuild-style NO lo montaba ⇒ openssl-sys llamaba a zig con
|
||||
# el triple alpine y abortaba (UnknownOperatingSystem).
|
||||
flags = ["--bin", "nu"]
|
||||
|
||||
[build.phases]
|
||||
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
|
||||
compile = '''
|
||||
_abuild_phase() {
|
||||
cargo build --release --frozen --bin nu
|
||||
}
|
||||
_abuild_phase
|
||||
'''
|
||||
# de package() de Alpine (traducido $pkgdir→/out):
|
||||
install = '''
|
||||
_abuild_phase() {
|
||||
find target/release \
|
||||
-maxdepth 1 \
|
||||
-executable \
|
||||
-type f \
|
||||
-name "nu*" \
|
||||
-exec install -Dm755 '{}' -t "/out"/usr/bin/ \;
|
||||
|
||||
install -Dm644 LICENSE \
|
||||
-t "/out"/usr/share/licenses/nushell/
|
||||
}
|
||||
_abuild_phase
|
||||
'''
|
||||
install = "mkdir -p /out/usr/bin && cp target/release/nu /out/usr/bin/nu"
|
||||
|
||||
[deps]
|
||||
build = ["openssl"]
|
||||
Reference in New Issue
Block a user