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>
This commit is contained in:
2026-05-17 13:07:12 +09:00
parent c2ff9c9fa5
commit 30eb0d6a61
95 changed files with 1514 additions and 1567 deletions

View File

@@ -2,16 +2,16 @@ package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newMksh() (pkg.Artifact, string) {
func (t Toolchain) newMksh(s *S) (pkg.Artifact, string) {
const (
version = "59c"
checksum = "0Zj-k4nXEu3IuJY4lvwD2OrC2t27GdZj8SPy4DoaeuBRH1padWb7oREpYgwY8JNq"
)
scriptTest := "./test.sh -C regress:no-ctty\n"
if presetOpts&OptSkipCheck != 0 {
if s.opts&OptSkipCheck != 0 {
scriptTest = ""
}
return t.New("mksh-"+version, 0, t.AppendPresets(nil,
return s.New(t, "mksh-"+version, 0, s.AppendPresets(t, nil,
Perl,
Coreutils,
), nil, []string{
@@ -36,7 +36,7 @@ ln -vs ../system/bin/sh /work/bin/
))), version
}
func init() {
artifactsM[Mksh] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newMksh,
Name: "mksh",
@@ -44,5 +44,5 @@ func init() {
Website: "https://www.mirbsd.org/mksh",
ID: 5590,
}
})
}