diff --git a/crates/hammer-build/src/fetch.rs b/crates/hammer-build/src/fetch.rs index 5c6b7341..a7ab8dd2 100644 --- a/crates/hammer-build/src/fetch.rs +++ b/crates/hammer-build/src/fetch.rs @@ -251,6 +251,9 @@ pub fn vendor_go_deps(src: &Path) -> hammer_core::Result<()> { .args(["mod", "vendor"]) .env("GOFLAGS", "-mod=mod") .env("GOTOOLCHAIN", "local") + // `go mod vendor` aborta en modo workspace (si el árbol trae go.work). Lo apagamos para + // vendorear contra el go.mod del módulo raíz (que es lo que el build compila). + .env("GOWORK", "off") .stdout(Stdio::inherit()) .stderr(Stdio::inherit()) .output() diff --git a/recipes/cheat.toml b/recipes/cheat.toml new file mode 100644 index 00000000..4b4d7845 --- /dev/null +++ b/recipes/cheat.toml @@ -0,0 +1,20 @@ +# cheat — receta Go (Etapa G frente Go). main en ./cmd/cheat. +name = "cheat" +version = "4.5.0" + +[source] +repo = "https://github.com/cheat/cheat" +commit = "cc85a4bdb104474e433313724d9b381bc5f6f6b0" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/cheat ./cmd/cheat" +install = "true" diff --git a/recipes/croc.toml b/recipes/croc.toml new file mode 100644 index 00000000..6e915725 --- /dev/null +++ b/recipes/croc.toml @@ -0,0 +1,24 @@ +# 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 = "croc" +version = "10.4.4" + +[source] +repo = "https://github.com/schollz/croc" +commit = "d225c8514f52b4335142394066b47bb0b70c8452" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/croc ." +install = "true" diff --git a/recipes/dnsx.toml b/recipes/dnsx.toml new file mode 100644 index 00000000..bed5373d --- /dev/null +++ b/recipes/dnsx.toml @@ -0,0 +1,20 @@ +# dnsx — receta Go (Etapa G frente Go). main en ./cmd/dnsx. +name = "dnsx" +version = "1.2.3" + +[source] +repo = "https://github.com/projectdiscovery/dnsx" +commit = "fa3b1876a3b20f93b06fc76a0beaa11a9075e80b" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/dnsx ./cmd/dnsx" +install = "true" diff --git a/recipes/dyff.toml b/recipes/dyff.toml new file mode 100644 index 00000000..a5a741cd --- /dev/null +++ b/recipes/dyff.toml @@ -0,0 +1,20 @@ +# dyff — receta Go (Etapa G frente Go). main en ./cmd/dyff. +name = "dyff" +version = "1.12.0" + +[source] +repo = "https://github.com/homeport/dyff" +commit = "ea5d770b575967f1bc21eefcae08712d8f755e04" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/dyff ./cmd/dyff" +install = "true" diff --git a/recipes/gron.toml b/recipes/gron.toml new file mode 100644 index 00000000..c4c4b5f5 --- /dev/null +++ b/recipes/gron.toml @@ -0,0 +1,24 @@ +# 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 = "gron" +version = "0.7.1" + +[source] +repo = "https://github.com/tomnomnom/gron" +commit = "badf401da553eb41b7ffde4be6a64809ed0ed846" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/gron ." +install = "true" diff --git a/recipes/gtrash.toml b/recipes/gtrash.toml new file mode 100644 index 00000000..b42e4422 --- /dev/null +++ b/recipes/gtrash.toml @@ -0,0 +1,24 @@ +# 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 = "gtrash" +version = "0.0.6" + +[source] +repo = "https://github.com/umlx5h/gtrash" +commit = "460e0b73615c653eee8941a3dd43fc1465260a3a" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/gtrash ." +install = "true" diff --git a/recipes/jump.toml b/recipes/jump.toml new file mode 100644 index 00000000..0825c589 --- /dev/null +++ b/recipes/jump.toml @@ -0,0 +1,24 @@ +# 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 = "jump" +version = "0.67.0" + +[source] +repo = "https://github.com/gsamokovarov/jump" +commit = "0e9fabf0c06a0c4f847081e7138b3478c3959dfd" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/jump ." +install = "true" diff --git a/recipes/miller.toml b/recipes/miller.toml new file mode 100644 index 00000000..e2808e74 --- /dev/null +++ b/recipes/miller.toml @@ -0,0 +1,20 @@ +# miller — receta Go (Etapa G frente Go). main en ./cmd/mlr, binario `mlr`. +name = "miller" +version = "6.18.1" + +[source] +repo = "https://github.com/johnkerl/miller" +commit = "22bed963460939d2c7482c9469a1ca7ed2ef8ffb" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/mlr ./cmd/mlr" +install = "true" diff --git a/recipes/qrcp.toml b/recipes/qrcp.toml new file mode 100644 index 00000000..98a2cd75 --- /dev/null +++ b/recipes/qrcp.toml @@ -0,0 +1,24 @@ +# 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 = "qrcp" +version = "0.11.6" + +[source] +repo = "https://github.com/claudiodangelis/qrcp" +commit = "4ed525205106afdf77f21347ee1aa21c385c1b85" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/qrcp ." +install = "true" diff --git a/recipes/walk.toml b/recipes/walk.toml new file mode 100644 index 00000000..efc6c873 --- /dev/null +++ b/recipes/walk.toml @@ -0,0 +1,24 @@ +# 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 = "walk" +version = "1.13.0" + +[source] +repo = "https://github.com/antonmedv/walk" +commit = "0c1a9c0dce2f1300b7848fa6e8cfd635377289b8" + +[build] +compiler = "zig-cc" +target = "x86_64-linux-musl" +link = "static" +flags = [] + +[deps] +build = ["go"] + +[build.phases] +configure = "true" +compile = "export GOCACHE=/tmp/gocache GOPATH=/tmp/gopath GOTOOLCHAIN=local CGO_ENABLED=0 GOFLAGS=-mod=vendor GOPROXY=off; go build -trimpath -ldflags=-buildid= -o /out/usr/bin/walk ." +install = "true"