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,12 +2,12 @@ package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newLibarchive() (pkg.Artifact, string) {
func (t Toolchain) newLibarchive(s *S) (pkg.Artifact, string) {
const (
version = "3.8.7"
checksum = "CUJK4MDQmZmATClgQBH2Wt-7Ts4iiSUlg1J_TVb6-5IK3rVUgVLIMc5k-bnWB9w3"
)
return t.NewPackage("libarchive", version, newFromGitHub(
return s.NewPackage(t, "libarchive", version, newFromGitHub(
"libarchive/libarchive",
"v"+version, checksum,
), &PackageAttr{
@@ -88,7 +88,7 @@ install -Dv /usr/src/CTestCustom.cmake /cure/
}, (*CMakeHelper)(nil)), version
}
func init() {
artifactsM[Libarchive] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newLibarchive,
Name: "libarchive",
@@ -96,5 +96,5 @@ func init() {
Website: "https://www.libarchive.org/",
ID: 1558,
}
})
}