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) newWayland() (pkg.Artifact, string) {
func (t Toolchain) newWayland(s *S) (pkg.Artifact, string) {
const (
version = "1.25.0"
checksum = "q-4dYXme46JPgLGtXAxyZGTy7udll9RfT0VXtcW2YRR1WWViUhvdZXZneXzLqpCg"
)
return t.NewPackage("wayland", version, newFromGitLab(
return s.NewPackage(t, "wayland", version, newFromGitLab(
"gitlab.freedesktop.org",
"wayland/wayland",
version,
@@ -35,7 +35,7 @@ echo 'int main(){}' > tests/sanity-test.c
), version
}
func init() {
artifactsM[Wayland] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newWayland,
Name: "wayland",
@@ -49,15 +49,15 @@ func init() {
},
ID: 10061,
}
})
}
func (t Toolchain) newWaylandProtocols() (pkg.Artifact, string) {
func (t Toolchain) newWaylandProtocols(s *S) (pkg.Artifact, string) {
const (
version = "1.48"
checksum = "xvfHCBIzXGwOqOu9b8dfhGw_U29Pd-g4JBwpYIaxee8SwEbxi6NaVU-Y1Q7wY4jK"
)
return t.NewPackage("wayland-protocols", version, newFromGitLab(
return s.NewPackage(t, "wayland-protocols", version, newFromGitLab(
"gitlab.freedesktop.org",
"wayland/wayland-protocols",
version,
@@ -121,7 +121,7 @@ GitLab
), version
}
func init() {
artifactsM[WaylandProtocols] = Metadata{
native.MustRegister(&Artifact{
f: Toolchain.newWaylandProtocols,
Name: "wayland-protocols",
@@ -129,5 +129,5 @@ func init() {
Website: "https://wayland.freedesktop.org/",
ID: 13997,
}
})
}