nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p jq xh
3
4set -eu -o pipefail
5
6cd "$(dirname "${BASH_SOURCE[0]}")"
7
8get_download_info() {
9 xh --json \
10 https://update.equinox.io/check \
11 'Accept:application/json; q=1; version=1; charset=utf-8' \
12 'Content-Type:application/json; charset=utf-8' \
13 app_id=app_c3U4eZcDbjV \
14 channel=stable \
15 os="$1" \
16 goarm= \
17 arch="$2" |
18 jq --arg sys "$1-$2" '{
19 sys: $sys,
20 url: .download_url,
21 sha256: .checksum,
22 version: .release.version
23 }'
24}
25
26(
27 get_download_info linux 386
28 get_download_info linux amd64
29 get_download_info linux arm
30 get_download_info linux arm64
31 get_download_info darwin amd64
32 get_download_info darwin arm64
33) | jq --slurp 'map ({ (.sys): . }) | add' \
34 >versions.json