aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/libpsl.go
blob: 6b0bbf493795ac84fa7a4a110b533d356d7d7aaa (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
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newLibpsl() pkg.Artifact {
	const (
		version  = "0.21.5"
		checksum = "XjfxSzh7peG2Vg4vJlL8z4JZJLcXqbuP6pLWkrGCmRxlnYUFTKNBqWGHCxEOlCad"
	)
	return t.NewViaMake("libpsl", version, pkg.NewHTTPGetTar(
		nil, "https://github.com/rockdaboot/libpsl/releases/download/"+
			version+"/libpsl-"+version+".tar.gz",
		mustDecode(checksum),
		pkg.TarGzip,
	), &MakeAttr{
		Writable: true,
		ScriptEarly: `
cd /usr/src/libpsl

test_disable() { chmod +w "$2" && echo "$1" > "$2"; }

test_disable 'int main(){return 0;}' tests/test-is-public-builtin.c
`,
	},
		t.Load(Python),
	)
}
func init() { artifactsF[Libpsl] = Toolchain.newLibpsl }