pantry/projects/go.dev/package.yml

60 lines
1.1 KiB
YAML
Raw Normal View History

2022-08-05 16:43:01 +03:00
distributable:
url: https://go.dev/dl/go{{ version.raw }}.src.tar.gz
strip-components: 1
versions:
github: golang/go/tags
strip: /^go/
provides:
- bin/go
interprets:
- .go
dependencies:
# `cgo` requires a C compiler
tea.xyz/gx/cc: c99
2022-08-05 16:43:01 +03:00
build:
dependencies:
gnu.org/m4: 1
tea.xyz/gx/make: '*'
tea.xyz/gx/cc: c99
2022-09-25 16:06:11 +03:00
go.dev: '*'
working-directory: src
2022-08-05 16:43:01 +03:00
script: |-
./make.bash
# cleanup
cd ..
2022-08-05 16:43:01 +03:00
rm src/*.{bash,bat,rc}
rm src/Make.dist
2022-09-25 16:06:11 +03:00
rm -rf "{{prefix}}"/*
mv * "{{prefix}}"
find "{{prefix}}" -mindepth 1 -maxdepth 1 -type f -delete -not -name build.sh
2022-09-25 16:06:11 +03:00
env:
GOROOT_FINAL: ${{ prefix }}
GOROOT_BOOTSTRAP: ${{ deps.go.dev.prefix }}
bootstrap:
dependencies:
curl.se: '*'
env:
'*/aarch64': {GOARCH: arm64}
'*/x86-64': {GOARCH: amd64}
script: |
curl -L "$URL" | tar xzf - -C "{{ prefix }}" --strip-components=1
2022-08-05 16:43:01 +03:00
test:
script: |
mv $FIXTURE $FIXTURE.go
OUTPUT=$(go run $FIXTURE.go)
test "Hello World" = "$OUTPUT"
fixture: |
package main
import "fmt"
func main() {
2022-09-02 18:00:33 +03:00
fmt.Println("Hello World")
}