coqPackages: refactor

Coq packages that depend on others need to be recompiled when the dependencies are updated, so we make the whole `coqPackages` overridable by `overrideScope'`, using `lib.makeScope`.
This commit is contained in:
Cyril Cohen 2019-04-09 01:07:42 +02:00
parent ed426e4df8
commit f7bf3d2239

View File

@ -2,8 +2,9 @@
let
mkCoqPackages' = self: coq:
let callPackage = newScope self ; in rec {
inherit callPackage coq;
let newScope = self.newScope;
callPackage = self.callPackage; in {
inherit coq;
coqPackages = self;
contribs = recurseIntoAttrs
@ -75,7 +76,7 @@ in rec {
* a `dontFilter` attribute into the Coq derivation.
*/
mkCoqPackages = coq:
let self = mkCoqPackages' self coq; in
let self = lib.makeScope newScope (lib.flip mkCoqPackages' coq); in
if coq.dontFilter or false then self
else filterCoqPackages coq self;