sergio/takana
> Una distribución Linux construida con un laboratorio funcional y hermético en el > sótano, y una terminal mutable, clásica y anárquica en el piso de arriba — diseñada > desde el suelo para que una IA programadora entienda, modifique y co…
Etapa G (go): re-alimenta la granja — tanda go-refeed (51 recetas) a incoming-go
1# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
2# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
3# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
4name = "grype"
5version = "0.111.0"
6
7[source]
8tarball = "https://github.com/anchore/grype/archive/v0.111.0/grype-0.111.0.tar.gz"
9# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
10# sha512 = "109662075d13ed6b397c3624679b52f49c2713d9bfc5562750ff2892c6f81810f616ffbb218bdfa31a8beae7331b0ff3d446de4cd9f295033afb527e74be1a0f"
11sha256 = "01d60c3e785f635da8f060712df2a901025386b740eb173e365ae0c263e66792"
12patches = ["disable-update-check.patch"]
13
14[build]
15compiler = "zig-cc"
16target = "x86_64-linux-musl"
17link = "static"
18flags = []
19
20[build.phases]
21# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
22compile = '''
23_abuild_phase() {
24go build -ldflags "
25 -X main.version=0.111.0
26 " \
27 -o bin/grype ./cmd/grype
28
29 ./bin/grype completion bash >grype.bash
30 ./bin/grype completion fish >grype.fish
31 ./bin/grype completion zsh >grype.zsh
32}
33_abuild_phase
34'''
35# de package() de Alpine (traducido $pkgdir→/out):
36install = '''
37_abuild_phase() {
38install -Dm755 bin/grype -t "/out"/usr/bin/
39
40 install -Dm644 grype.bash "/out"/usr/share/bash-completion/completions/grype
41 install -Dm644 grype.fish "/out"/usr/share/fish/vendor_completions.d/grype.fish
42 install -Dm644 grype.zsh "/out"/usr/share/zsh/site-functions/_grype
43}
44_abuild_phase
45'''