forked from security/hakurei
internal/rosa: libpsl artifact
Required by curl. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
28
internal/rosa/libpsl.go
Normal file
28
internal/rosa/libpsl.go
Normal file
@@ -0,0 +1,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 }
|
||||
Reference in New Issue
Block a user