aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/libpsl.go
blob: 4f1cd40ba7ae041ae36958756963eb62cc78defd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newLibpsl() (pkg.Artifact, string) {
	const (
		version  = "0.21.5"
		checksum = "XjfxSzh7peG2Vg4vJlL8z4JZJLcXqbuP6pLWkrGCmRxlnYUFTKNBqWGHCxEOlCad"
	)
	return t.NewPackage("libpsl", version, pkg.NewHTTPGetTar(
		nil, "https://github.com/rockdaboot/libpsl/releases/download/"+
			version+"/libpsl-"+version+".tar.gz",
		mustDecode(checksum),
		pkg.TarGzip,
	), &PackageAttr{
		Writable: true,
		ScriptEarly: `
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }

test_disable 'int main(){return 0;}' tests/test-is-public-builtin.c
`,
	}, (*MakeHelper)(nil),
		Python,
	), version
}
func init() {
	artifactsM[Libpsl] = Metadata{
		f: Toolchain.newLibpsl,

		Name:        "libpsl",
		Description: "provides functions to work with the Mozilla Public Suffix List",
		Website:     "https://rockdaboot.github.io/libpsl/",

		ID: 7305,
	}
}