at master 526 B view raw
1#! /usr/bin/env nix-shell 2#! nix-shell -p bash curl ripgrep jq -i bash 3 4set -euxo pipefail 5 6# Possibly also add non-https redirect, but there were non of those when I first 7# made this script to test that. Feel free to add it when it is relevant. 8curl https://repology.org/api/v1/repository/nix_unstable/problems \ 9 | jq -r '.[] | select(.type == "homepage_permanent_https_redirect") | .data | "s@\(.url)@\(.target)@"' \ 10 | sort | uniq | tee script.sed 11find -name '*.nix' | xargs -P4 -- sed -f script.sed -i 12rm script.sed