3
0
Fork 0
forked from mirrors/nixpkgs

stdenv: implement config.checkMetaRecursively

This option makes `meta.evaluate` into a close approximation of the result of
evaluating `.outPath` by checking all the dependencies recursively at a cost of
2x slowdown. Note that actually evaluating `.outPath` costs some
5x-7x more because `.outPath` also computes all the hashes.
This commit is contained in:
Jan Malakhovski 2018-01-02 14:52:27 +00:00
parent ecd3990cd4
commit eaee2a1199

View file

@ -72,6 +72,9 @@ rec {
inherit erroneousHardeningFlags hardeningDisable hardeningEnable supportedHardeningFlags;
})
else let
references = nativeBuildInputs ++ buildInputs
++ propagatedNativeBuildInputs ++ propagatedBuildInputs;
dependencies = map (map lib.chooseDevOutputs) [
[
(map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
@ -213,7 +216,10 @@ rec {
position = pos.file + ":" + toString pos.line;
# Expose the result of the checks for everyone to see.
} // {
evaluates = validity.valid;
evaluates = validity.valid
&& (if config.checkMetaRecursively or false
then lib.all (d: d.meta.evaluates or true) references
else true);
};
in