Files
hakurei/internal/rosa/git.go
Ophestra 20790af71e
All checks were successful
Test / Create distribution (push) Successful in 48s
Test / Sandbox (push) Successful in 2m37s
Test / Hakurei (push) Successful in 4m5s
Test / ShareFS (push) Successful in 4m2s
Test / Hpkg (push) Successful in 4m33s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 5m57s
Test / Flake checks (push) Successful in 1m44s
internal/rosa: lazy initialise all artifacts
This improves performance, though not as drastically as lazy initialising llvm.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25 01:43:18 +09:00

34 lines
773 B
Go

package rosa
import (
"hakurei.app/internal/pkg"
)
func (t Toolchain) newGit() pkg.Artifact {
const (
version = "2.52.0"
checksum = "uH3J1HAN_c6PfGNJd2OBwW4zo36n71wmkdvityYnrh8Ak0D1IifiAvEWz9Vi9DmS"
)
return t.New("git-"+version, stage3Concat(t, []pkg.Artifact{},
t.Load(Make),
t.Load(Perl),
t.Load(M4),
t.Load(Autoconf),
t.Load(Gettext),
t.Load(Zlib),
), 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,
)))
}
func init() { artifactsF[Git] = Toolchain.newGit }