From 20790af71ec9a69a462ecaaa7fc308e3b685383d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 25 Jan 2026 01:32:21 +0900 Subject: internal/rosa: lazy initialise all artifacts This improves performance, though not as drastically as lazy initialising llvm. Signed-off-by: Ophestra --- internal/rosa/ninja.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/rosa/ninja.go') 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 } -- cgit v1.3.1