aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-05 18:06:33 +0900
committerOphestra <cat@gensokyo.uk>2026-02-05 18:06:33 +0900
commit3c9f7cfcd0d0ecdff108ce12eefc24f236e1c566 (patch)
treecf906c6cad9855c9bc7274e3bb725433a862461b
parenta3526b3ceb90db2bc7d7337ed89febd5cd4a89f3 (diff)
internal/rosa: libpsl artifact
Required by curl. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rw-r--r--internal/rosa/all.go2
-rw-r--r--internal/rosa/libpsl.go28
2 files changed, 30 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index 04ac5221..9ff5798a 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -33,6 +33,7 @@ const (
KernelHeaders
LibXau
Libexpat
+ Libpsl
Libffi
Libgd
Libtool
@@ -118,6 +119,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
"kernel-headers": KernelHeaders,
"libXau": LibXau,
"libexpat": Libexpat,
+ "libpsl": Libpsl,
"libseccomp": Libseccomp,
"libxml2": Libxml2,
"libffi": Libffi,
diff --git a/internal/rosa/libpsl.go b/internal/rosa/libpsl.go
new file mode 100644
index 00000000..6b0bbf49
--- /dev/null
+++ b/internal/rosa/libpsl.go
@@ -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 }