aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/toybox.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/toybox.go')
-rw-r--r--internal/rosa/toybox.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/rosa/toybox.go b/internal/rosa/toybox.go
index 7a86fb80..d5e12380 100644
--- a/internal/rosa/toybox.go
+++ b/internal/rosa/toybox.go
@@ -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/",
- }
+ })
}