aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/go.az
blob: 6ec5249b69e04949864406c6ea057093ee4733ff (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.3";
	source = remoteTar {
		url = "https://go.dev/dl/go"+version+".src.tar.gz";
		checksum = "lyIgV0TTDx3yF3__cI507YUvU1ubQ2-6JwCLbycUdKKZlbJWWIf_8sfPbIHCev_n";
		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 ];
}