filterCoqPackages: honor recurseIntoAttrs

This commit is contained in:
Vincent Laporte 2018-12-01 18:15:42 +00:00 committed by Vincent Laporte
parent a2aa3dc0bd
commit 83d84c08b9

View File

@ -43,11 +43,17 @@ let
Verdi = callPackage ../development/coq-modules/Verdi {};
};
filterCoqPackages = coq:
lib.filterAttrsRecursive
(_: p:
let pred = p.compatibleCoqVersions or (_: true);
in pred coq.coq-version
filterCoqPackages = coq: set:
lib.listToAttrs (
lib.concatMap (name:
let v = set.${name}; in
let p = v.compatibleCoqVersions or (_: true); in
lib.optional (p coq.coq-version)
(lib.nameValuePair name (
if lib.isAttrs v && v.recurseForDerivations or false
then filterCoqPackages coq v
else v))
) (lib.attrNames set)
);
in rec {