1#! /usr/bin/env nix-shell
2#! nix-shell -i bash -p coreutils nix gnused -I nixpkgs=.
3
4config_file=pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
5
6cat > $config_file << EOF
7# This file is automatically generated by
8# maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh
9# It is supposed to list all haskellPackages that cannot evaluate because they
10# depend on a dependency marked as broken.
11dont-distribute-packages:
12EOF
13
14echo "Regenerating list of transitive broken packages ..."
15echo -e $(nix-instantiate --eval --strict maintainers/scripts/haskell/transitive-broken-packages.nix) | sed 's/\"//' | LC_ALL=C.UTF-8 sort -i >> $config_file