git.iko.soy/typeable/nixpkgs
on master help sign in
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`.

commitf7bf3d2239ed578b6054ba500c6a75a4206eed29 authorCyril Cohen <cohen@crans.org> dateTue 9 Apr 2019, 01:07 (8 years ago) parented426e4
1 file changed+4−3
pkgs/top-level/coq-packages.nix+4−3
pkgs/top-level/coq-packages.nix+4−3
@@ -2,8 +2,9 @@
22
33let
44 mkCoqPackages' = self: coq:
5− let callPackage = newScope self ; in rec {
6− inherit callPackage coq;
5+ let newScope = self.newScope;
6+ callPackage = self.callPackage; in {
7+ inherit coq;
78 coqPackages = self;
89
910 contribs = recurseIntoAttrs
@@ -75,7 +76,7 @@ in rec {
7576 * a `dontFilter` attribute into the Coq derivation.
7677 */
7778 mkCoqPackages = coq:
78− let self = mkCoqPackages' self coq; in
79+ let self = lib.makeScope newScope (lib.flip mkCoqPackages' coq); in
7980 if coq.dontFilter or false then self
8081 else filterCoqPackages coq self;
8182