internal/rosa: key metadata by string
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m55s
Test / ShareFS (push) Successful in 3m46s
Test / Hakurei (push) Successful in 3m57s
Test / Sandbox (race detector) (push) Successful in 5m25s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m21s

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

@@ -6,12 +6,12 @@ import (
"hakurei.app/internal/pkg"
)
func (t Toolchain) newUnzip() (pkg.Artifact, string) {
func (t Toolchain) newUnzip(s *S) (pkg.Artifact, string) {
const (
version = "6.0"
checksum = "fcqjB1IOVRNJ16K5gTGEDt3zCJDVBc7EDSra9w3H93stqkNwH1vaPQs_QGOpQZu1"
)
return t.New("unzip-"+version, 0, t.AppendPresets(nil,
return s.New(t, "unzip-"+version, 0, s.AppendPresets(t, nil,
Make,
Coreutils,
), nil, nil, `
@@ -21,7 +21,7 @@ make -f unix/Makefile generic1
mkdir -p /work/system/bin/
mv unzip /work/system/bin/
`, pkg.Path(AbsUsrSrc.Append("unzip"), true, t.NewPatchedSource(
`, pkg.Path(AbsUsrSrc.Append("unzip"), true, s.NewPatchedSource(t,
"unzip", version, newTar(
"https://downloads.sourceforge.net/project/infozip/"+
"UnZip%206.x%20%28latest%29/UnZip%20"+version+"/"+
@@ -32,7 +32,7 @@ mv unzip /work/system/bin/
))), version
}
func init() {
artifactsM[Unzip] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newUnzip,
Name: "unzip",
@@ -40,5 +40,5 @@ func init() {
Website: "https://infozip.sourceforge.net/",
ID: 8684,
}
})
}