diff options
author | Cyril Cohen <cohen@crans.org> | 2019-04-09 01:07:42 +0200 |
---|---|---|
committer | Cyril Cohen <cohen@crans.org> | 2019-04-10 12:56:57 +0200 |
commit | f7bf3d2239ed578b6054ba500c6a75a4206eed29 (patch) | |
tree | 3d69aad9a67cec9c6d644300473532102f17ca26 /pkgs | |
parent | ed426e4df8468e5b9517a8e2d54dd2c26aaa8ccf (diff) |
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`.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/top-level/coq-packages.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/top-level/coq-packages.nix b/pkgs/top-level/coq-packages.nix index f08f2eacc23c..2659a3302025 100644 --- a/pkgs/top-level/coq-packages.nix +++ b/pkgs/top-level/coq-packages.nix @@ -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; |