aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/ninja.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-25 01:32:21 +0900
committerOphestra <cat@gensokyo.uk>2026-01-25 01:43:18 +0900
commit20790af71ec9a69a462ecaaa7fc308e3b685383d (patch)
treee7cfdd8fec51c5dc37db88ad887c07dee947b600 /internal/rosa/ninja.go
parent43b8a40fc0e8d99bf29531d33f1f57d0c6e9df5e (diff)
internal/rosa: lazy initialise all artifacts
This improves performance, though not as drastically as lazy initialising llvm. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/ninja.go')
-rw-r--r--internal/rosa/ninja.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/rosa/ninja.go b/internal/rosa/ninja.go
index 4cdef7a0..42496e15 100644
--- a/internal/rosa/ninja.go
+++ b/internal/rosa/ninja.go
@@ -2,15 +2,14 @@ package rosa
import "hakurei.app/internal/pkg"
-// NewNinja returns a [pkg.Artifact] containing an installation of Ninja.
-func (t Toolchain) NewNinja() pkg.Artifact {
+func (t Toolchain) newNinja() pkg.Artifact {
const (
version = "1.13.2"
checksum = "ygKWMa0YV2lWKiFro5hnL-vcKbc_-RACZuPu0Io8qDvgQlZ0dxv7hPNSFkt4214v"
)
return t.New("ninja-"+version, []pkg.Artifact{
- t.NewCMake(),
- t.NewPython(),
+ t.Load(CMake),
+ t.Load(Python),
}, nil, nil, `
chmod -R +w /usr/src/ninja/
mkdir -p /work/system/bin/ && cd /work/system/bin/
@@ -33,3 +32,4 @@ python3 /usr/src/ninja/configure.py \
pkg.TarGzip,
)))
}
+func init() { artifactsF[Ninja] = Toolchain.newNinja }