Files
hakurei/internal/rosa/mksh.go
Ophestra 2df9e200c8
Some checks failed
Test / Create distribution (push) Successful in 1m8s
Test / Sandbox (push) Successful in 2m53s
Test / Hakurei (push) Successful in 4m5s
Test / ShareFS (push) Successful in 4m14s
Test / Flake checks (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Test / Hakurei (race detector) (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
internal/rosa: rename stage0 toolchain
This is stage0 relative to Rosa OS, and stage3 relative to the toolchain it is compiled on (Gentoo in this case). Referring to the toolchain itself as stage3 is counterintuitive and misleading.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-09 00:50:38 +09:00

37 lines
973 B
Go

package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newMksh() pkg.Artifact {
const (
version = "59c"
checksum = "0Zj-k4nXEu3IuJY4lvwD2OrC2t27GdZj8SPy4DoaeuBRH1padWb7oREpYgwY8JNq"
)
return t.New("mksh-"+version, 0, stage0Concat(t, []pkg.Artifact{},
t.Load(Perl),
t.Load(Coreutils),
), nil, []string{
"LDSTATIC=-static",
"CPPFLAGS=-DMKSH_DEFAULT_PROFILEDIR=\\\"/system/etc\\\"",
}, `
cd "$(mktemp -d)"
sh /usr/src/mksh/Build.sh -r
CPPFLAGS="${CPPFLAGS} -DMKSH_BINSHPOSIX -DMKSH_BINSHREDUCED" \
sh /usr/src/mksh/Build.sh -r -L
./test.sh -C regress:no-ctty
mkdir -p /work/system/bin/
cp -v mksh /work/system/bin/
cp -v lksh /work/system/bin/sh
mkdir -p /work/bin/
ln -vs ../system/bin/sh /work/bin/
`, pkg.Path(AbsUsrSrc.Append("mksh"), false, pkg.NewHTTPGetTar(
nil,
"https://mbsd.evolvis.org/MirOS/dist/mir/mksh/mksh-R"+version+".tgz",
mustDecode(checksum),
pkg.TarGzip,
)))
}
func init() { artifactsF[Mksh] = Toolchain.newMksh }