# 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 = "syft" version = "1.42.4" [source] tarball = "https://github.com/anchore/syft/archive/v1.42.4/syft-1.42.4.tar.gz" # FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine: # sha512 = "846637c7ced355722f86aee40a080383cd708f680216e83c664d3103af37ed4e205b2b64369cb61bd4f39233645ec3fa3694c527144e228b73b5c88b2f6242ba" sha256 = "8e84d456e253149d0e0c5a381a1cc4121a0e169c0608c73f99eed9ea56ed036d" patches = ["disable-update-check.patch"] [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() { go build -ldflags " -X main.version=1.42.4 " \ -o bin/syft ./cmd/syft bin/syft completion bash >syft.bash bin/syft completion fish >syft.fish bin/syft completion zsh >syft.zsh } _abuild_phase ''' # de package() de Alpine (traducido $pkgdir→/out): install = ''' _abuild_phase() { install -Dm755 bin/syft -t "/out"/usr/bin/ install -Dm644 syft.bash "/out"/usr/share/bash-completion/completions/syft install -Dm644 syft.fish "/out"/usr/share/fish/vendor_completions.d/syft.fish install -Dm644 syft.zsh "/out"/usr/share/zsh/site-functions/_syft } _abuild_phase '''