nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#!/usr/bin/env nix-shell
2#!nix-shell -i bash -p nix-prefetch-scripts jq
3
4set -eox pipefail
5
6here="$(dirname "${BASH_SOURCE[0]}")"
7modules="${here}/modules"
8srcs="${here}/srcs-generated.json"
9
10while read -r module; do
11 if [[ -z "$module" ]]; then continue; fi
12 url="https://invent.kde.org/qt/qt/${module}.git"
13 nix-prefetch-git --url $url --rev refs/heads/kde/5.15 --fetch-submodules \
14 | jq "{key: \"${module}\", value: {url,rev,sha256}}"
15done < "$modules" | jq -s 'from_entries' > "${srcs}.tmp"
16
17mv "${srcs}.tmp" "$srcs"