diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-17 13:07:12 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-17 15:56:53 +0900 |
| commit | 30eb0d6a613ad268f6805ccbcdcabf158e7f526f (patch) | |
| tree | 07e55baa52748fd139e183017eeb43f5f64cee59 /internal/rosa/ninja.go | |
| parent | c2ff9c9fa55ea569a5e70ee90d2eb0b2ee2a0540 (diff) | |
internal/rosa: key metadata by string
For upcoming azalea integration. The API is quite ugly right now to ease migration.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/ninja.go')
| -rw-r--r-- | internal/rosa/ninja.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/internal/rosa/ninja.go b/internal/rosa/ninja.go index 3614f99d..3801d3ee 100644 --- a/internal/rosa/ninja.go +++ b/internal/rosa/ninja.go @@ -2,14 +2,16 @@ package rosa import "hakurei.app/internal/pkg" -func (t Toolchain) newNinja() (pkg.Artifact, string) { +func (t Toolchain) newNinja(s *S) (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), + python, _ := s.Load(t, Python) + bash, _ := s.Load(t, Bash) + return s.New(t, "ninja-"+version, 0, []pkg.Artifact{ + python, + bash, }, nil, nil, ` cd "$(mktemp -d)" python3 /usr/src/ninja/configure.py \ @@ -28,7 +30,7 @@ cp ninja /work/system/bin/ "googletest-1.16.0.tar.gz", "NjLGvSbgPy_B-y-o1hdanlzEzaYeStFcvFGxpYV3KYlhrWWFRcugYhM3ZMzOA9B_", pkg.TarGzip, - )), pkg.Path(AbsUsrSrc.Append("ninja"), true, t.NewPatchedSource( + )), pkg.Path(AbsUsrSrc.Append("ninja"), true, s.NewPatchedSource(t, "ninja", version, newFromGitHub( "ninja-build/ninja", "v"+version, @@ -37,7 +39,7 @@ cp ninja /work/system/bin/ ))), version } func init() { - artifactsM[Ninja] = Metadata{ + native.MustRegister(&Artifact{ f: Toolchain.newNinja, Name: "ninja", @@ -45,5 +47,5 @@ func init() { Website: "https://ninja-build.org/", ID: 2089, - } + }) } |
