diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2018-12-01 18:15:42 +0000 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2018-12-09 03:08:54 +0000 |
commit | 83d84c08b90141a1eb71a6d41cdd054df52c2a49 (patch) | |
tree | 0892487fff1bf2dbdca18f4477d6a6fa03ffe3e9 /pkgs | |
parent | a2aa3dc0bd1f9351b389e4529bb98d3398610e06 (diff) |
filterCoqPackages: honor `recurseIntoAttrs`
Diffstat (limited to 'pkgs')
-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 { |