Files
hakurei/internal/rosa/ninja.go
Ophestra f14ab80253
All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m48s
Test / Hakurei (push) Successful in 3m36s
Test / ShareFS (push) Successful in 3m47s
Test / Sandbox (race detector) (push) Successful in 4m54s
Test / Hakurei (race detector) (push) Successful in 5m53s
Test / Flake checks (push) Successful in 1m29s
internal/rosa: populate Anitya project ids
This enables release monitoring for all applicable projects.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-05 21:32:15 +09:00

49 lines
1.2 KiB
Go

package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newNinja() (pkg.Artifact, string) {
const (
version = "1.13.2"
checksum = "ygKWMa0YV2lWKiFro5hnL-vcKbc_-RACZuPu0Io8qDvgQlZ0dxv7hPNSFkt4214v"
)
return t.New("ninja-"+version, 0, []pkg.Artifact{
t.Load(Python),
t.Load(Bash),
}, nil, nil, `
cd "$(mktemp -d)"
python3 /usr/src/ninja/configure.py \
--bootstrap \
--gtest-source-dir=/usr/src/googletest
./ninja all
./ninja_test
mkdir -p /work/system/bin/
cp ninja /work/system/bin/
`, pkg.Path(AbsUsrSrc.Append("googletest"), false,
pkg.NewHTTPGetTar(
nil, "https://github.com/google/googletest/releases/download/"+
"v1.16.0/googletest-1.16.0.tar.gz",
mustDecode("NjLGvSbgPy_B-y-o1hdanlzEzaYeStFcvFGxpYV3KYlhrWWFRcugYhM3ZMzOA9B_"),
pkg.TarGzip,
)), pkg.Path(AbsUsrSrc.Append("ninja"), true, t.NewPatchedSource(
"ninja", version, pkg.NewHTTPGetTar(
nil, "https://github.com/ninja-build/ninja/archive/refs/tags/"+
"v"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), false,
))), version
}
func init() {
artifactsM[Ninja] = Metadata{
f: Toolchain.newNinja,
Name: "ninja",
Description: "a small build system with a focus on speed",
Website: "https://ninja-build.org/",
ID: 2089,
}
}