Files
hakurei/internal/rosa/package/go/package.az
T
2026-08-14 16:18:55 +09:00

63 lines
1.2 KiB
Go

package go {
description = "the Go programming language toolchain";
website = "https://go.dev";
anitya = 1227;
version# = "1.26.6";
source = remoteTar {
url = "https://go.dev/dl/go"+version+".src.tar.gz";
checksum = "BJQz9rGJ7ElMsZGURH7lw48Hw0x88RwdQJpINMomtgGCMK3AtwGCxDRkLE9REh5r";
compress = gzip;
};
patches = [
// https://go.dev/issue/77674
"746640.patch",
];
env = [
"CC=cc",
"GOCACHE=/tmp/gocache",
"GOROOT_BOOTSTRAP=/system/go",
"TMPDIR=/dev/shm/go",
];
enterSource = true;
exec = generic {
chdir = false;
build = `
mkdir /work/system/ "${TMPDIR}"
cp -r . /work/system/go
cd /work/system/go/src/
chmod -R +w ..
sed -i \
's,/lib/ld-musl-`+linuxArch+`.so.1,/system/bin/linker,' \
cmd/link/internal/`+arch+`/obj.go
rm \
os/root_unix_test.go \
runtime/crash_cgo_test.go \
cmd/cgo/internal/testsanitizers/tsan_test.go \
cmd/cgo/internal/testsanitizers/cshared_test.go
set +u
. ./make.bash "$@" --no-banner
set -u
`;
check = "bash run.bash --no-rebuild\n";
install = `
../bin/go tool dist banner # print build info
mkdir /work/system/bin
ln -s \
../go/bin/go \
../go/bin/gofmt \
/work/system/bin
`;
};
inputs = [ bash, go-bootstrap ];
}