mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
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:
parent
ed426e4df8
commit
f7bf3d2239
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user