mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-31 20:54:56 +00:00
The attribute names in haskellPackages no longer match the Hackage package names in all cases (which hackage2nix uses to match its config files against packages), but the pnames do, so let's use those here. To prevent accidentally disabling a package because a versioned package depends on a broken one, we need to filter out all versioned attributes as well. This doesn't change anything since they already have empty hydraPlatforms.
23 lines
625 B
Nix
23 lines
625 B
Nix
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}
|
|
''
|