# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
name    = "wayland-protocols"
version = "1.48"

[source]
tarball = "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.48/downloads/wayland-protocols-1.48.tar.xz"
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
# sha512 = "24950c6181f576f8926e2631a3f017986f809cd4fe8efe6fc8e4d872e98aacabb9eb79877371fb5def1fc78027c8e1e1e25bb98d455c22624a810707be0b2c24"
sha256  = "398036ac0eb6484982ddbde7ff86848d753231f9cdeeae983f06b52946625aa1"

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "static"
flags    = []

[build.phases]
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
compile = '''
_abuild_phase() {
abuild-meson . output
	meson compile -C output
}
_abuild_phase
'''
# de package() de Alpine (traducido $pkgdir→/out):
install = '''
_abuild_phase() {
DESTDIR="/out" meson install --no-rebuild -C output
}
_abuild_phase
'''

[deps]
build = ["wayland"]
