(defadapter gomod
:ecosystem "gomod"
:manifest-files ("go.mod")
:schema-version 2
:verbs
((:name build :status live :hermetic t
:doc "go.mod + vendored tree -> Go.build-spec.json (per-package incremental)")
(:name confirm :status live
:doc "run the typed invariants over the encoded spec")
(:name lock :status unsupported :milestone "M-lock"
:doc "go mod vendor/tidy — the resolver invocation (network)")
(:name plan :status unsupported :milestone "M2")
(:name diff :status unsupported :milestone "M2")
(:name sbom :status unsupported :milestone "M2"))
:resolver
(:command "go list -deps -json -tags <tags> ./..."
:env (("GOFLAGS" . "-mod=vendor") ("GOPROXY" . "off")
("GOOS" . "<goos>") ("GOARCH" . "<goarch>") ("CGO_ENABLED" . "0"))
:hermetic t
:seam "gen_gomod::interp::GoBuildEnv")
:quirk-dispatcher "gen.gomod.gomod-quirk"
:hashes
((:field source_hash :alg blake3 :over "sorted go_files ++ embed.files (length-prefixed)")
(:field go_sum_sha256 :alg sha256 :over "go.sum content"
:note "sha256 (not blake3) — Nix has builtins.hashFile \"sha256\"; empty ⇒ e3b0c4…")))