diff options
-rw-r--r-- | pkgs/top-level/coq-packages.nix | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index 188ab06b9698..6d6de4e22bd9 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -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 { |