1
0
forked from rosa/hakurei
Files
hakurei/internal/rosa/zstd.go
Ophestra 2548a681e9 internal/rosa: key-value type
This type is used very frequently. The new type is much easier to type and can receive helper methods eventually if needed.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-26 16:23:15 +09:00

33 lines
758 B
Go

package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newZstd() (pkg.Artifact, string) {
const (
version = "1.5.7"
checksum = "4XhfR7DwVkwo1R-TmYDAJOcx9YXv9WSFhcFUe3hWEAMmdMLPhFaznCqYIA19_xxV"
)
return t.NewPackage("zstd", version, pkg.NewHTTPGetTar(
nil, "https://github.com/facebook/zstd/releases/download/"+
"v"+version+"/zstd-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), nil, &CMakeHelper{
Append: []string{"build", "cmake"},
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
},
}), version
}
func init() {
artifactsM[Zstd] = Metadata{
f: Toolchain.newZstd,
Name: "zstd",
Description: "a fast compression algorithm",
Website: "https://facebook.github.io/zstd/",
ID: 12083,
}
}