summaryrefslogtreecommitdiffstats
path: root/maintainers/scripts/haskell/transitive-broken-packages.nix
blob: 890bec72663d4343e020633f7e8e63d3f0e273df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let
  nixpkgs = import ../../..;
  inherit (nixpkgs { }) pkgs lib;
  isVersioned = attr: builtins.match "[A-Za-z0-9-]+(_[0-9]+)+" attr != null;
  getEvaluating =
    x:
    lib.mapAttrsToList (_: v: v.pname) (
      lib.filterAttrs (
        n: v:
        !(isVersioned n)
        && (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}
''