755d5259c7
- use `restrict-eval` so that we're not affected by the user's environment - use jq instead of the horrible echo+sed hack The second point also fixes the indentation before each line to be two spaces instead of one, so I set it back to one space to avoid a diff.
15 lines
709 B
Bash
Executable file
15 lines
709 B
Bash
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -i bash -p coreutils jq nix -I nixpkgs=.
|
|
|
|
config_file=pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
|
|
|
|
cat > $config_file << EOF
|
|
# 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
|
|
|
|
echo "Regenerating list of transitive broken packages ..."
|
|
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 >> $config_file
|