diff --git a/internal/rosa/all.go b/internal/rosa/all.go index 6c1a8ab..d59e748 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -76,6 +76,7 @@ const ( Xproto XZ Zlib + Zstd buildcatrust @@ -176,6 +177,7 @@ func ResolveName(name string) (p PArtifact, ok bool) { "xproto": Xproto, "xz": XZ, "zlib": Zlib, + "zstd": Zstd, }[name] return } diff --git a/internal/rosa/zstd.go b/internal/rosa/zstd.go new file mode 100644 index 0000000..05164cf --- /dev/null +++ b/internal/rosa/zstd.go @@ -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 }