mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 08:55:07 +03:00
56 lines
1.1 KiB
YAML
56 lines
1.1 KiB
YAML
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
|
|
|
|
build:
|
|
dependencies:
|
|
gnu.org/m4: 1
|
|
tea.xyz/gx/make: '*'
|
|
tea.xyz/gx/cc: c99
|
|
nixos.org/patchelf: ^0.15
|
|
go.dev: '*'
|
|
working-directory: src
|
|
script: |-
|
|
./make.bash
|
|
|
|
# cleanup
|
|
cd ..
|
|
rm src/*.{bash,bat,rc}
|
|
rm src/Make.dist
|
|
rm -rf "{{prefix}}"/*
|
|
mv * "{{prefix}}"
|
|
find "{{prefix}}" -mindepth 1 -maxdepth 1 -type f -delete -not -name build.sh
|
|
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
|
|
|
|
test:
|
|
script: |
|
|
mv $FIXTURE $FIXTURE.go
|
|
OUTPUT=$(go run $FIXTURE.go)
|
|
test "Hello World" = "$OUTPUT"
|
|
fixture: |
|
|
package main
|
|
import "fmt"
|
|
func main() {
|
|
fmt.Println("Hello World")
|
|
}
|