Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / maintainers / scripts / haskell / regenerate-transitive-broken-packages.sh
bloba317dba4d4e77c0eb53357ae12b09b6931f111e7
1 #! /usr/bin/env nix-shell
2 #! nix-shell -i bash -p coreutils jq nix -I nixpkgs=.
4 set -euo pipefail
6 TMP_TEMPLATE=transitive-broken.XXXXXXX
7 readonly TMP_TEMPLATE
9 tmpfile=$(mktemp "$TMP_TEMPLATE")
11 trap 'rm -f "${tmpfile}"' 0
13 config_file=pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
15 cat > $tmpfile << EOF
16 # This file is automatically generated by
17 # maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh
18 # It is supposed to list all haskellPackages that cannot evaluate because they
19 # depend on a dependency marked as broken.
20 dont-distribute-packages:
21 EOF
23 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
25 mv $tmpfile $config_file