forked from rosa/hakurei
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:
@@ -2,12 +2,12 @@ package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newToybox(suffix, script string) (pkg.Artifact, string) {
|
||||
func (s *S) newToybox(t Toolchain, suffix, script string) (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.8.13"
|
||||
checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI"
|
||||
)
|
||||
return t.NewPackage("toybox"+suffix, version, newTar(
|
||||
return s.NewPackage(t, "toybox"+suffix, version, newTar(
|
||||
"https://landley.net/toybox/downloads/toybox-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
@@ -59,9 +59,9 @@ ln -s ../../system/bin/env /work/usr/bin
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Toybox] = Metadata{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newToybox("", "")
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain, s *S) (pkg.Artifact, string) {
|
||||
return s.newToybox(t, "", "")
|
||||
},
|
||||
|
||||
Name: "toybox",
|
||||
@@ -69,11 +69,11 @@ func init() {
|
||||
Website: "https://landley.net/toybox/",
|
||||
|
||||
ID: 13818,
|
||||
}
|
||||
})
|
||||
|
||||
artifactsM[toyboxEarly] = Metadata{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
return t.newToybox("-early", `
|
||||
native.MustRegister(&Artifact{
|
||||
f: func(t Toolchain, s *S) (pkg.Artifact, string) {
|
||||
return s.newToybox(t, "-early", `
|
||||
echo '
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_TR=y
|
||||
@@ -86,5 +86,5 @@ CONFIG_DIFF=y
|
||||
Name: "toybox-early",
|
||||
Description: "a build of toybox with unfinished tools enabled to break dependency loops",
|
||||
Website: "https://landley.net/toybox/",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user