internal/rosa: zstd artifact
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m39s
Test / Hakurei (push) Successful in 3m55s
Test / ShareFS (push) Successful in 4m3s
Test / Hpkg (push) Successful in 4m34s
Test / Sandbox (race detector) (push) Successful in 5m7s
Test / Hakurei (race detector) (push) Successful in 6m14s
Test / Flake checks (push) Successful in 1m45s

Optional dependency of many programs, and generally useful to have around.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-12 01:48:21 +09:00
parent 1791b604b5
commit 3e18a4b397
2 changed files with 24 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ const (
Xproto Xproto
XZ XZ
Zlib Zlib
Zstd
buildcatrust buildcatrust
@@ -176,6 +177,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
"xproto": Xproto, "xproto": Xproto,
"xz": XZ, "xz": XZ,
"zlib": Zlib, "zlib": Zlib,
"zstd": Zstd,
}[name] }[name]
return return
} }

22
internal/rosa/zstd.go Normal file
View File

@@ -0,0 +1,22 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newZstd() pkg.Artifact {
const (
version = "1.5.7"
checksum = "4XhfR7DwVkwo1R-TmYDAJOcx9YXv9WSFhcFUe3hWEAMmdMLPhFaznCqYIA19_xxV"
)
return t.NewViaCMake("zstd", version, "full", pkg.NewHTTPGetTar(
nil, "https://github.com/facebook/zstd/releases/download/"+
"v"+version+"/zstd-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &CMakeAttr{
Append: []string{"build", "cmake"},
Cache: [][2]string{
{"CMAKE_BUILD_TYPE", "Release"},
},
})
}
func init() { artifactsF[Zstd] = Toolchain.newZstd }