2021-05-05 22:38:46 +02:00
|
|
|
#! /usr/bin/env nix-shell
|
2022-12-24 11:02:15 +01:00
|
|
|
#! nix-shell -i bash -p coreutils jq nix -I nixpkgs=.
|
2021-05-09 13:47:15 +02:00
|
|
|
|
2023-05-01 02:36:37 +02:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
TMP_TEMPLATE=transitive-broken.XXXXXXX
|
|
|
|
readonly TMP_TEMPLATE
|
|
|
|
|
|
|
|
tmpfile=$(mktemp "$TMP_TEMPLATE")
|
|
|
|
|
2023-05-02 12:07:11 +02:00
|
|
|
trap 'rm -f "${tmpfile}"' 0
|
2023-05-01 02:36:37 +02:00
|
|
|
|
2021-05-09 13:47:15 +02:00
|
|
|
config_file=pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
|
|
|
|
|
2023-05-01 02:36:37 +02:00
|
|
|
cat > $tmpfile << EOF
|
2021-05-09 13:47:15 +02:00
|
|
|
# This file is automatically generated by
|
|
|
|
# maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh
|
|
|
|
# It is supposed to list all haskellPackages that cannot evaluate because they
|
|
|
|
# depend on a dependency marked as broken.
|
|
|
|
dont-distribute-packages:
|
|
|
|
EOF
|
|
|
|
|
2023-05-01 02:36:37 +02:00
|
|
|
nix-instantiate --eval --option restrict-eval true -I . --strict --json maintainers/scripts/haskell/transitive-broken-packages.nix | jq -r . | LC_ALL=C.UTF-8 sort -i >> $tmpfile
|
|
|
|
|
|
|
|
mv $tmpfile $config_file
|