nixpkgs/maintainers/scripts/haskell/transitive-broken-packages.nix
Naïm Favier 755d5259c7
maintainers/scripts/haskell: fix regenerate-transitive-broken
- 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.
2022-12-24 13:38:34 +01:00

17 lines
475 B
Nix

let
nixpkgs = import ../../..;
inherit (nixpkgs {}) pkgs lib;
getEvaluating = x:
builtins.attrNames (
lib.filterAttrs (
_: v: (builtins.tryEval (v.outPath or null)).success && lib.isDerivation v && !v.meta.broken
) x
);
brokenDeps = lib.subtractLists
(getEvaluating pkgs.haskellPackages)
(getEvaluating (nixpkgs { config.allowBroken = true; }).haskellPackages);
in
''
${lib.concatMapStringsSep "\n" (x: " - ${x}") brokenDeps}
''