1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p nix-prefetch-scripts jq
6 here
="$(dirname "${BASH_SOURCE[0]}")"
7 modules
="${here}/modules"
8 srcs
="${here}/srcs-generated.json"
10 while 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}}"
15 done < "$modules" | jq
-s 'from_entries' > "${srcs}.tmp"
17 mv "${srcs}.tmp" "$srcs"