internal/rosa: git artifact
All checks were successful
Test / Create distribution (push) Successful in 1m41s
Test / Sandbox (push) Successful in 5m23s
Test / ShareFS (push) Successful in 34s
Test / Sandbox (race detector) (push) Successful in 2m24s
Test / Hakurei (push) Successful in 2m50s
Test / Hakurei (race detector) (push) Successful in 3m19s
Test / Hpkg (push) Successful in 3m21s
Test / Flake checks (push) Successful in 1m47s

This is required by the clang unit and regression tests.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-21 06:59:30 +09:00
parent b72dc43bc3
commit b6a66acfe4
2 changed files with 29 additions and 0 deletions

View File

@@ -149,6 +149,8 @@ func main() {
a = rosa.Std.NewBusybox() a = rosa.Std.NewBusybox()
case "musl": case "musl":
a = rosa.Std.NewMusl(nil) a = rosa.Std.NewMusl(nil)
case "git":
a = rosa.Std.NewGit()
case "go": case "go":
a = rosa.Std.NewGo() a = rosa.Std.NewGo()
case "rsync": case "rsync":

27
internal/rosa/git.go Normal file
View File

@@ -0,0 +1,27 @@
package rosa
import (
"hakurei.app/internal/pkg"
)
// NewGit returns a [pkg.Artifact] containing an installation of git.
func (t Toolchain) NewGit() pkg.Artifact {
const (
version = "2.52.0"
checksum = "uH3J1HAN_c6PfGNJd2OBwW4zo36n71wmkdvityYnrh8Ak0D1IifiAvEWz9Vi9DmS"
)
return t.New("git-"+version, []pkg.Artifact{
t.NewMake(),
}, nil, nil, `
chmod -R +w /usr/src/git && cd /usr/src/git
make configure
./configure --prefix=/system
make "-j$(nproc)" all
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("git"), true, pkg.NewHTTPGetTar(
nil, "https://www.kernel.org/pub/software/scm/git/"+
"git-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}