1
0
forked from rosa/hakurei
Files
hakurei/internal/rosa/ninja.go
Ophestra d6b082dd0b internal/rosa/ninja: bootstrap with verbose output
This otherwise outputs nothing, and appears to hang until the (fully single-threaded) bootstrap completes.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-15 22:19:05 +09:00

50 lines
1.1 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 \
--verbose \
--bootstrap \
--gtest-source-dir=/usr/src/googletest
./ninja `+jobsFlagE+` all
./ninja_test
mkdir -p /work/system/bin/
cp ninja /work/system/bin/
`, pkg.Path(AbsUsrSrc.Append("googletest"), false,
newFromGitHubRelease(
"google/googletest",
"v1.16.0",
"googletest-1.16.0.tar.gz",
"NjLGvSbgPy_B-y-o1hdanlzEzaYeStFcvFGxpYV3KYlhrWWFRcugYhM3ZMzOA9B_",
pkg.TarGzip,
)), pkg.Path(AbsUsrSrc.Append("ninja"), true, t.NewPatchedSource(
"ninja", version, newFromGitHub(
"ninja-build/ninja",
"v"+version,
checksum,
), 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,
}
}