Files
hakurei/internal/rosa/ninja.go
Ophestra eb67e5e0a8
All checks were successful
Test / Create distribution (push) Successful in 50s
Test / Sandbox (push) Successful in 2m34s
Test / Hakurei (push) Successful in 3m46s
Test / ShareFS (push) Successful in 3m59s
Test / Hpkg (push) Successful in 4m32s
Test / Sandbox (race detector) (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 6m8s
Test / Flake checks (push) Successful in 1m36s
internal/pkg: exclusive artifacts
This alleviates scheduler overhead when curing many artifacts.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27 01:23:50 +09:00

36 lines
1.0 KiB
Go

package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newNinja() pkg.Artifact {
const (
version = "1.13.2"
checksum = "ygKWMa0YV2lWKiFro5hnL-vcKbc_-RACZuPu0Io8qDvgQlZ0dxv7hPNSFkt4214v"
)
return t.New("ninja-"+version, false, []pkg.Artifact{
t.Load(CMake),
t.Load(Python),
}, nil, nil, `
chmod -R +w /usr/src/ninja/
mkdir -p /work/system/bin/ && cd /work/system/bin/
python3 /usr/src/ninja/configure.py \
--bootstrap \
--gtest-source-dir=/usr/src/googletest
./ninja all
./ninja_test
`, 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,
pkg.NewHTTPGetTar(
nil, "https://github.com/ninja-build/ninja/archive/refs/tags/"+
"v"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}
func init() { artifactsF[Ninja] = Toolchain.newNinja }