mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Per-output reference and closure size checks
In structured-attributes derivations, you can now specify per-output checks such as: outputChecks."out" = { # The closure of 'out' must not be larger than 256 MiB. maxClosureSize = 256 * 1024 * 1024; # It must not refer to C compiler or to the 'dev' output. disallowedRequisites = [ stdenv.cc "dev" ]; }; outputChecks."dev" = { # The 'dev' output must not be larger than 128 KiB. maxSize = 128 * 1024; }; Also fixed a bug in allowedRequisites that caused it to ignore self-references.
This commit is contained in:
parent
7a9ac91a43
commit
3cd15c5b1f
2 changed files with 169 additions and 52 deletions
|
@ -33,7 +33,7 @@ rec {
|
|||
};
|
||||
|
||||
# When specifying all the requisites, the build succeeds.
|
||||
test1 = makeTest 1 [ dep1 dep2 deps ];
|
||||
test1 = makeTest 1 [ "out" dep1 dep2 deps ];
|
||||
|
||||
# But missing anything it fails.
|
||||
test2 = makeTest 2 [ dep2 deps ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue