Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
471 B · 16 lines
Shell
1234567891011121314151617#!/usr/bin/env nix-shell#! nix-shell -i bash -p curl jq# shellcheck shell=bashset -euo pipefail
BASEURL=https://go.dev/dl/VERSION=${1:-}
if [[ -z ${VERSION} ]]; then echo "No version supplied" exit 1fi
curl -s "${BASEURL}?mode=json&include=all" | jq '.[] | select(.version == "go'"${VERSION}"'")' | jq -r '.files[] | select(.kind == "archive" and (.os == "linux" or .os == "darwin" or .os == "freebsd")) | (.os + "-" + .arch + " = \"" + .sha256 + "\";")'