aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/go.az
blob: 8e8b3fa86a10d20910dc20c7256d3f3c3e303a00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package go {
	description = "the Go programming language toolchain";
	website = "https://go.dev";
	anitya = 1227;

	version# = "1.27.4";
	source = remoteTar {
		url = "https://go.dev/dl/go"+version+".src.tar.gz";
		checksum = "-JoL9QsJIBpv9iC9vT2J90lRB4vmSArg81zoWMiti_V68yx04K8Psc8L1iQO7AGE";
		compress = gzip;
	};

	env = [
		"CC=cc",
		"GOCACHE=/tmp/gocache",
		"GOROOT_BOOTSTRAP="+prefix+"/go",
		"TMPDIR=/dev/shm/go",
	];

	enterSource = true;

	exec = generic {
		chdir = false;
		build = `
mkdir /work`+prefix+`/ "${TMPDIR}"
cp -r . /work`+prefix+`/go
cd /work`+prefix+`/go/src/
chmod -R +w ..

set +u
. ./make.bash "$@" --no-banner
set -u
`;
		check = `
mkdir /lib && ln -s ../system/lib/ld-musl-`+llvmArch+`.so.1 /lib/
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

bash run.bash --no-rebuild
`;
		install = `
../bin/go tool dist banner # print build info

mkdir /work`+prefix+`/bin
ln -s \
	../go/bin/go \
	../go/bin/gofmt \
	/work`+prefix+`/bin
`;
	};

	tools = [ bash, go-bootstrap ];
}