31 lines
1.1 KiB
TOML
31 lines
1.1 KiB
TOML
# Importada de nixpkgs por `hammer import-nix` (Etapa G). PUNTO DE PARTIDA, no final:
|
|
# - el build usa el lab de hammer (zig-cc / musl estático), NO el stdenv de nix ⇒ revisá
|
|
# compiler/link/phases y adaptá hasta que compile.
|
|
# - las deps van con su nombre NIX; remapealas a las recetas del corpus si difieren.
|
|
name = "trivy"
|
|
version = "0.72.0"
|
|
|
|
[source]
|
|
repo = "https://github.com/aquasecurity/trivy"
|
|
commit = "v0.72.0"
|
|
|
|
[build]
|
|
compiler = "zig-cc"
|
|
target = "x86_64-linux-musl"
|
|
link = "static"
|
|
flags = []
|
|
|
|
# buildInputs de nix (no usados con CGO off): go
|
|
[deps]
|
|
build = ["go"]
|
|
|
|
[build.phases]
|
|
# = el compile Go generado por el lab + GOEXPERIMENT=jsonv2: trivy 0.72 importa
|
|
# encoding/json/v2, que en go 1.26 sigue detrás del experimento (build constraints
|
|
# excluyen esos fuentes sin el flag).
|
|
compile = '''
|
|
export GOCACHE=/src/.gocache GOTMPDIR=/src/.gotmp GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off GOBIN=/out/usr/bin GOEXPERIMENT=jsonv2
|
|
mkdir -p /src/.gotmp
|
|
go install -trimpath -ldflags=-buildid= ./cmd/trivy
|
|
'''
|