aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/gnu.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-04 18:01:18 +0900
committerOphestra <cat@gensokyo.uk>2026-03-05 00:20:27 +0900
commitd2c6d486b06073aa88ee1912d3587f657cd57304 (patch)
tree42e7df590ee8cda255e4cd35f9bd5ff7f9b2f94f /internal/rosa/gnu.go
parent6fdd800b2b421b32e7db373b576433126c4652a2 (diff)
internal/rosa: provide package metadata
This had to be done out-of-band because there was no way to efficiently represent these within Artifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/gnu.go')
-rw-r--r--internal/rosa/gnu.go350
1 files changed, 275 insertions, 75 deletions
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
index 328a372c..f3f35ec9 100644
--- a/internal/rosa/gnu.go
+++ b/internal/rosa/gnu.go
@@ -2,7 +2,7 @@ package rosa
import "hakurei.app/internal/pkg"
-func (t Toolchain) newM4() pkg.Artifact {
+func (t Toolchain) newM4() (pkg.Artifact, string) {
const (
version = "1.4.20"
checksum = "RT0_L3m4Co86bVBY3lCFAEs040yI1WdeNmRylFpah8IZovTm6O4wI7qiHJN3qsW9"
@@ -18,11 +18,19 @@ chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh
`,
}, (*MakeHelper)(nil),
Diffutils,
- )
+ ), version
+}
+func init() {
+ artifactsM[M4] = Metadata{
+ f: Toolchain.newM4,
+
+ Name: "m4",
+ Description: "a macro processor with GNU extensions",
+ Website: "https://www.gnu.org/software/m4/",
+ }
}
-func init() { artifactsF[M4] = Toolchain.newM4 }
-func (t Toolchain) newBison() pkg.Artifact {
+func (t Toolchain) newBison() (pkg.Artifact, string) {
const (
version = "3.8.2"
checksum = "BhRM6K7URj1LNOkIDCFDctSErLS-Xo5d9ba9seg10o6ACrgC1uNhED7CQPgIY29Y"
@@ -35,11 +43,19 @@ func (t Toolchain) newBison() pkg.Artifact {
M4,
Diffutils,
Sed,
- )
+ ), version
}
-func init() { artifactsF[Bison] = Toolchain.newBison }
+func init() {
+ artifactsM[Bison] = Metadata{
+ f: Toolchain.newBison,
-func (t Toolchain) newSed() pkg.Artifact {
+ Name: "bison",
+ Description: "a general-purpose parser generator",
+ Website: "https://www.gnu.org/software/bison/",
+ }
+}
+
+func (t Toolchain) newSed() (pkg.Artifact, string) {
const (
version = "4.9"
checksum = "pe7HWH4PHNYrazOTlUoE1fXmhn2GOPFN_xE62i0llOr3kYGrH1g2_orDz0UtZ9Nt"
@@ -50,11 +66,19 @@ func (t Toolchain) newSed() pkg.Artifact {
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Diffutils,
- )
+ ), version
+}
+func init() {
+ artifactsM[Sed] = Metadata{
+ f: Toolchain.newSed,
+
+ Name: "sed",
+ Description: "a non-interactive command-line text editor",
+ Website: "https://www.gnu.org/software/sed/",
+ }
}
-func init() { artifactsF[Sed] = Toolchain.newSed }
-func (t Toolchain) newAutoconf() pkg.Artifact {
+func (t Toolchain) newAutoconf() (pkg.Artifact, string) {
const (
version = "2.72"
checksum = "-c5blYkC-xLDer3TWEqJTyh1RLbOd1c5dnRLKsDnIrg_wWNOLBpaqMY8FvmUFJ33"
@@ -75,11 +99,19 @@ func (t Toolchain) newAutoconf() pkg.Artifact {
Perl,
Bash,
Diffutils,
- )
+ ), version
+}
+func init() {
+ artifactsM[Autoconf] = Metadata{
+ f: Toolchain.newAutoconf,
+
+ Name: "autoconf",
+ Description: "M4 macros to produce self-contained configure script",
+ Website: "https://www.gnu.org/software/autoconf/",
+ }
}
-func init() { artifactsF[Autoconf] = Toolchain.newAutoconf }
-func (t Toolchain) newAutomake() pkg.Artifact {
+func (t Toolchain) newAutomake() (pkg.Artifact, string) {
const (
version = "1.18.1"
checksum = "FjvLG_GdQP7cThTZJLDMxYpRcKdpAVG-YDs1Fj1yaHlSdh_Kx6nRGN14E0r_BjcG"
@@ -107,11 +139,19 @@ test_disable '#!/bin/sh' t/pr9.sh
Gzip,
Autoconf,
Diffutils,
- )
+ ), version
}
-func init() { artifactsF[Automake] = Toolchain.newAutomake }
+func init() {
+ artifactsM[Automake] = Metadata{
+ f: Toolchain.newAutomake,
-func (t Toolchain) newLibtool() pkg.Artifact {
+ Name: "automake",
+ Description: "a tool for automatically generating Makefile.in files",
+ Website: "https://www.gnu.org/software/automake/",
+ }
+}
+
+func (t Toolchain) newLibtool() (pkg.Artifact, string) {
const (
version = "2.5.4"
checksum = "pa6LSrQggh8mSJHQfwGjysAApmZlGJt8wif2cCLzqAAa2jpsTY0jZ-6stS3BWZ2Q"
@@ -128,11 +168,19 @@ func (t Toolchain) newLibtool() pkg.Artifact {
},
M4,
Diffutils,
- )
+ ), version
+}
+func init() {
+ artifactsM[Libtool] = Metadata{
+ f: Toolchain.newLibtool,
+
+ Name: "libtool",
+ Description: "a generic library support script",
+ Website: "https://www.gnu.org/software/libtool/",
+ }
}
-func init() { artifactsF[Libtool] = Toolchain.newLibtool }
-func (t Toolchain) newGzip() pkg.Artifact {
+func (t Toolchain) newGzip() (pkg.Artifact, string) {
const (
version = "1.14"
checksum = "NWhjUavnNfTDFkZJyAUonL9aCOak8GVajWX2OMlzpFnuI0ErpBFyj88mz2xSjz0q"
@@ -144,11 +192,19 @@ func (t Toolchain) newGzip() pkg.Artifact {
), nil, &MakeHelper{
// dependency loop
SkipCheck: true,
- })
+ }), version
}
-func init() { artifactsF[Gzip] = Toolchain.newGzip }
+func init() {
+ artifactsM[Gzip] = Metadata{
+ f: Toolchain.newGzip,
-func (t Toolchain) newGettext() pkg.Artifact {
+ Name: "gzip",
+ Description: "a popular data compression program",
+ Website: "https://www.gnu.org/software/gzip/",
+ }
+}
+
+func (t Toolchain) newGettext() (pkg.Artifact, string) {
const (
version = "1.0"
checksum = "3MasKeEdPeFEgWgzsBKk7JqWqql1wEMbgPmzAfs-mluyokoW0N8oQVxPQoOnSdgC"
@@ -180,11 +236,19 @@ touch gettext-tools/autotools/archive.dir.tar
Sed,
KernelHeaders,
- )
+ ), version
+}
+func init() {
+ artifactsM[Gettext] = Metadata{
+ f: Toolchain.newGettext,
+
+ Name: "gettext",
+ Description: "tools for producing multi-lingual messages",
+ Website: "https://www.gnu.org/software/gettext/",
+ }
}
-func init() { artifactsF[Gettext] = Toolchain.newGettext }
-func (t Toolchain) newDiffutils() pkg.Artifact {
+func (t Toolchain) newDiffutils() (pkg.Artifact, string) {
const (
version = "3.12"
checksum = "9J5VAq5oA7eqwzS1Yvw-l3G5o-TccUrNQR3PvyB_lgdryOFAfxtvQfKfhdpquE44"
@@ -203,11 +267,19 @@ test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c
test_disable '#!/bin/sh' tests/cmp
`,
Flag: TEarly,
- }, (*MakeHelper)(nil))
+ }, (*MakeHelper)(nil)), version
}
-func init() { artifactsF[Diffutils] = Toolchain.newDiffutils }
+func init() {
+ artifactsM[Diffutils] = Metadata{
+ f: Toolchain.newDiffutils,
-func (t Toolchain) newPatch() pkg.Artifact {
+ Name: "diffutils",
+ Description: "several programs related to finding differences between files",
+ Website: "https://www.gnu.org/software/diffutils/",
+ }
+}
+
+func (t Toolchain) newPatch() (pkg.Artifact, string) {
const (
version = "2.8"
checksum = "MA0BQc662i8QYBD-DdGgyyfTwaeALZ1K0yusV9rAmNiIsQdX-69YC4t9JEGXZkeR"
@@ -225,11 +297,19 @@ test_disable '#!/bin/sh' tests/ed-style
test_disable '#!/bin/sh' tests/need-filename
`,
Flag: TEarly,
- }, (*MakeHelper)(nil))
+ }, (*MakeHelper)(nil)), version
+}
+func init() {
+ artifactsM[Patch] = Metadata{
+ f: Toolchain.newPatch,
+
+ Name: "patch",
+ Description: "a program to apply diff output to files",
+ Website: "https://savannah.gnu.org/projects/patch/",
+ }
}
-func init() { artifactsF[Patch] = Toolchain.newPatch }
-func (t Toolchain) newBash() pkg.Artifact {
+func (t Toolchain) newBash() (pkg.Artifact, string) {
const (
version = "5.3"
checksum = "4LQ_GRoB_ko-Ih8QPf_xRKA02xAm_TOxQgcJLmFDT6udUPxTAWrsj-ZNeuTusyDq"
@@ -245,11 +325,19 @@ func (t Toolchain) newBash() pkg.Artifact {
Configure: [][2]string{
{"without-bash-malloc"},
},
- })
+ }), version
}
-func init() { artifactsF[Bash] = Toolchain.newBash }
+func init() {
+ artifactsM[Bash] = Metadata{
+ f: Toolchain.newBash,
-func (t Toolchain) newCoreutils() pkg.Artifact {
+ Name: "bash",
+ Description: "the Bourne Again SHell",
+ Website: "https://www.gnu.org/software/bash/",
+ }
+}
+
+func (t Toolchain) newCoreutils() (pkg.Artifact, string) {
const (
version = "9.9"
checksum = "B1_TaXj1j5aiVIcazLWu8Ix03wDV54uo2_iBry4qHG6Y-9bjDpUPlkNLmU_3Nvw6"
@@ -281,11 +369,19 @@ test_disable 'int main(){return 0;}' gnulib-tests/test-lchown.c
Bash,
KernelHeaders,
- )
+ ), version
+}
+func init() {
+ artifactsM[Coreutils] = Metadata{
+ f: Toolchain.newCoreutils,
+
+ Name: "coreutils",
+ Description: "the basic file, shell and text manipulation utilities",
+ Website: "https://www.gnu.org/software/coreutils/",
+ }
}
-func init() { artifactsF[Coreutils] = Toolchain.newCoreutils }
-func (t Toolchain) newTexinfo() pkg.Artifact {
+func (t Toolchain) newTexinfo() (pkg.Artifact, string) {
const (
version = "7.2"
checksum = "9EelM5b7QGMAY5DKrAm_El8lofBGuFWlaBPSBhh7l_VQE8054MBmC0KBvGrABqjv"
@@ -299,11 +395,19 @@ func (t Toolchain) newTexinfo() pkg.Artifact {
SkipCheck: true,
},
Perl,
- )
+ ), version
+}
+func init() {
+ artifactsM[Texinfo] = Metadata{
+ f: Toolchain.newTexinfo,
+
+ Name: "texinfo",
+ Description: "the GNU square-wheel-reinvension of man pages",
+ Website: "https://www.gnu.org/software/texinfo/",
+ }
}
-func init() { artifactsF[Texinfo] = Toolchain.newTexinfo }
-func (t Toolchain) newGperf() pkg.Artifact {
+func (t Toolchain) newGperf() (pkg.Artifact, string) {
const (
version = "3.3"
checksum = "RtIy9pPb_Bb8-31J2Nw-rRGso2JlS-lDlVhuNYhqR7Nt4xM_nObznxAlBMnarJv7"
@@ -314,11 +418,19 @@ func (t Toolchain) newGperf() pkg.Artifact {
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Diffutils,
- )
+ ), version
+}
+func init() {
+ artifactsM[Gperf] = Metadata{
+ f: Toolchain.newGperf,
+
+ Name: "gperf",
+ Description: "a perfect hash function generator",
+ Website: "https://www.gnu.org/software/gperf/",
+ }
}
-func init() { artifactsF[Gperf] = Toolchain.newGperf }
-func (t Toolchain) newGawk() pkg.Artifact {
+func (t Toolchain) newGawk() (pkg.Artifact, string) {
const (
version = "5.3.2"
checksum = "uIs0d14h_d2DgMGYwrPtegGNyt_bxzG3D6Fe-MmExx_pVoVkQaHzrtmiXVr6NHKk"
@@ -332,11 +444,19 @@ func (t Toolchain) newGawk() pkg.Artifact {
}, &MakeHelper{
// dependency loop
SkipCheck: true,
- })
+ }), version
+}
+func init() {
+ artifactsM[Gawk] = Metadata{
+ f: Toolchain.newGawk,
+
+ Name: "gawk",
+ Description: "an implementation of awk with GNU extensions",
+ Website: "https://www.gnu.org/software/gawk/",
+ }
}
-func init() { artifactsF[Gawk] = Toolchain.newGawk }
-func (t Toolchain) newGrep() pkg.Artifact {
+func (t Toolchain) newGrep() (pkg.Artifact, string) {
const (
version = "3.12"
checksum = "qMB4RjaPNRRYsxix6YOrjE8gyAT1zVSTy4nW4wKW9fqa0CHYAuWgPwDTirENzm_1"
@@ -355,11 +475,19 @@ test_disable 'int main(){return 0;}' gnulib-tests/test-c32ispunct.c
`,
}, (*MakeHelper)(nil),
Diffutils,
- )
+ ), version
+}
+func init() {
+ artifactsM[Grep] = Metadata{
+ f: Toolchain.newGrep,
+
+ Name: "grep",
+ Description: "searches input for lines containing a match to a pattern",
+ Website: "https://www.gnu.org/software/grep/",
+ }
}
-func init() { artifactsF[Grep] = Toolchain.newGrep }
-func (t Toolchain) newFindutils() pkg.Artifact {
+func (t Toolchain) newFindutils() (pkg.Artifact, string) {
const (
version = "4.10.0"
checksum = "ZXABdNBQXL7QjTygynRRTdXYWxQKZ0Wn5eMd3NUnxR0xaS0u0VfcKoTlbo50zxv6"
@@ -377,11 +505,19 @@ echo 'int main(){return 0;}' > tests/xargs/test-sigusr.c
Diffutils,
XZ,
Sed,
- )
+ ), version
}
-func init() { artifactsF[Findutils] = Toolchain.newFindutils }
+func init() {
+ artifactsM[Findutils] = Metadata{
+ f: Toolchain.newFindutils,
-func (t Toolchain) newBC() pkg.Artifact {
+ Name: "findutils",
+ Description: "the basic directory searching utilities",
+ Website: "https://www.gnu.org/software/findutils/",
+ }
+}
+
+func (t Toolchain) newBC() (pkg.Artifact, string) {
const (
version = "1.08.2"
checksum = "8h6f3hjV80XiFs6v9HOPF2KEyg1kuOgn5eeFdVspV05ODBVQss-ey5glc8AmneLy"
@@ -397,11 +533,19 @@ func (t Toolchain) newBC() pkg.Artifact {
}, (*MakeHelper)(nil),
Perl,
Texinfo,
- )
+ ), version
+}
+func init() {
+ artifactsM[BC] = Metadata{
+ f: Toolchain.newBC,
+
+ Name: "bc",
+ Description: "an arbitrary precision numeric processing language",
+ Website: "https://www.gnu.org/software/bc/",
+ }
}
-func init() { artifactsF[BC] = Toolchain.newBC }
-func (t Toolchain) newLibiconv() pkg.Artifact {
+func (t Toolchain) newLibiconv() (pkg.Artifact, string) {
const (
version = "1.18"
checksum = "iV5q3VxP5VPdJ-X7O5OQI4fGm8VjeYb5viLd1L3eAHg26bbHb2_Qn63XPF3ucVZr"
@@ -410,11 +554,19 @@ func (t Toolchain) newLibiconv() pkg.Artifact {
nil, "https://ftpmirror.gnu.org/gnu/libiconv/libiconv-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
- ), nil, (*MakeHelper)(nil))
+ ), nil, (*MakeHelper)(nil)), version
+}
+func init() {
+ artifactsM[Libiconv] = Metadata{
+ f: Toolchain.newLibiconv,
+
+ Name: "libiconv",
+ Description: "iconv implementation independent of glibc",
+ Website: "https://www.gnu.org/software/libiconv/",
+ }
}
-func init() { artifactsF[Libiconv] = Toolchain.newLibiconv }
-func (t Toolchain) newTar() pkg.Artifact {
+func (t Toolchain) newTar() (pkg.Artifact, string) {
const (
version = "1.35"
checksum = "zSaoSlVUDW0dSfm4sbL4FrXLFR8U40Fh3zY5DWhR5NCIJ6GjU6Kc4VZo2-ZqpBRA"
@@ -442,11 +594,19 @@ func (t Toolchain) newTar() pkg.Artifact {
Gzip,
Bzip2,
Zstd,
- )
+ ), version
}
-func init() { artifactsF[Tar] = Toolchain.newTar }
+func init() {
+ artifactsM[Tar] = Metadata{
+ f: Toolchain.newTar,
-func (t Toolchain) newBinutils() pkg.Artifact {
+ Name: "tar",
+ Description: "provides the ability to create tar archives",
+ Website: "https://www.gnu.org/software/tar/",
+ }
+}
+
+func (t Toolchain) newBinutils() (pkg.Artifact, string) {
const (
version = "2.45"
checksum = "hlLtqqHDmzAT2OQVHaKEd_io2DGFvJkaeS-igBuK8bRRir7LUKGHgHYNkDVKaHTT"
@@ -457,11 +617,19 @@ func (t Toolchain) newBinutils() pkg.Artifact {
pkg.TarBzip2,
), nil, (*MakeHelper)(nil),
Bash,
- )
+ ), version
+}
+func init() {
+ artifactsM[Binutils] = Metadata{
+ f: Toolchain.newBinutils,
+
+ Name: "binutils",
+ Description: "a collection of binary tools",
+ Website: "https://www.gnu.org/software/binutils/",
+ }
}
-func init() { artifactsF[Binutils] = Toolchain.newBinutils }
-func (t Toolchain) newGMP() pkg.Artifact {
+func (t Toolchain) newGMP() (pkg.Artifact, string) {
const (
version = "6.3.0"
checksum = "yrgbgEDWKDdMWVHh7gPbVl56-sRtVVhfvv0M_LX7xMUUk_mvZ1QOJEAnt7g4i3k5"
@@ -473,11 +641,19 @@ func (t Toolchain) newGMP() pkg.Artifact {
pkg.TarBzip2,
), nil, (*MakeHelper)(nil),
M4,
- )
+ ), version
+}
+func init() {
+ artifactsM[GMP] = Metadata{
+ f: Toolchain.newGMP,
+
+ Name: "gmp",
+ Description: "a free library for arbitrary precision arithmetic",
+ Website: "https://gmplib.org/",
+ }
}
-func init() { artifactsF[GMP] = Toolchain.newGMP }
-func (t Toolchain) newMPFR() pkg.Artifact {
+func (t Toolchain) newMPFR() (pkg.Artifact, string) {
const (
version = "4.2.2"
checksum = "wN3gx0zfIuCn9r3VAn_9bmfvAYILwrRfgBjYSD1IjLqyLrLojNN5vKyQuTE9kA-B"
@@ -489,11 +665,19 @@ func (t Toolchain) newMPFR() pkg.Artifact {
pkg.TarBzip2,
), nil, (*MakeHelper)(nil),
GMP,
- )
+ ), version
}
-func init() { artifactsF[MPFR] = Toolchain.newMPFR }
+func init() {
+ artifactsM[MPFR] = Metadata{
+ f: Toolchain.newMPFR,
-func (t Toolchain) newMPC() pkg.Artifact {
+ Name: "mpfr",
+ Description: "a C library for multiple-precision floating-point computations",
+ Website: "https://www.mpfr.org/",
+ }
+}
+
+func (t Toolchain) newMPC() (pkg.Artifact, string) {
const (
version = "1.3.1"
checksum = "o8r8K9R4x7PuRx0-JE3-bC5jZQrtxGV2nkB773aqJ3uaxOiBDCID1gKjPaaDxX4V"
@@ -506,11 +690,19 @@ func (t Toolchain) newMPC() pkg.Artifact {
), nil, (*MakeHelper)(nil),
GMP,
MPFR,
- )
+ ), version
+}
+func init() {
+ artifactsM[MPC] = Metadata{
+ f: Toolchain.newMPC,
+
+ Name: "mpc",
+ Description: "a C library for the arithmetic of complex numbers",
+ Website: "https://www.multiprecision.org/",
+ }
}
-func init() { artifactsF[MPC] = Toolchain.newMPC }
-func (t Toolchain) newGCC() pkg.Artifact {
+func (t Toolchain) newGCC() (pkg.Artifact, string) {
const (
version = "15.2.0"
checksum = "TXJ5WrbXlGLzy1swghQTr4qxgDCyIZFgJry51XEPTBZ8QYbVmFeB4lZbSMtPJ-a1"
@@ -710,6 +902,14 @@ ln -s system/lib /work/
Zlib,
Libucontext,
KernelHeaders,
- )
+ ), version
+}
+func init() {
+ artifactsM[gcc] = Metadata{
+ f: Toolchain.newGCC,
+
+ Name: "gcc",
+ Description: "The GNU Compiler Collection",
+ Website: "https://www.gnu.org/software/gcc/",
+ }
}
-func init() { artifactsF[gcc] = Toolchain.newGCC }