aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/unzip.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-17 13:07:12 +0900
committerOphestra <cat@gensokyo.uk>2026-05-17 15:56:53 +0900
commit30eb0d6a613ad268f6805ccbcdcabf158e7f526f (patch)
tree07e55baa52748fd139e183017eeb43f5f64cee59 /internal/rosa/unzip.go
parentc2ff9c9fa55ea569a5e70ee90d2eb0b2ee2a0540 (diff)
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>
Diffstat (limited to 'internal/rosa/unzip.go')
-rw-r--r--internal/rosa/unzip.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/rosa/unzip.go b/internal/rosa/unzip.go
index 7dd8f01c..8c3f16b5 100644
--- a/internal/rosa/unzip.go
+++ b/internal/rosa/unzip.go
@@ -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,
- }
+ })
}