mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 16:45:49 +01:00
No description
d804730382
problem: the nix language assert function can't be used because of the fix-style used in modular-nixos. A minimal stripped down version illustrating the problem looks like this: fix (x : assert x.cfg.foo; { upstartJob = ...; cfg = ...; } ) Now nix has to evaluate x.cfg.foo in order to check the assertion. However to do so it has to access x.cfg.foo beeing defined in the body The body can only be evaluated after the assertion passes. So in the end you get an infinite recursion error. pierron mentioned that adding another mkIf like function could work. Maybe this implementation is even simpler. It adds another option collecting assertions only. The evaluation is forced by a function adding an empty list to extraPackages. extraPackages is evaluated by nixos in all cases. If there are assertions evaluating to false all assertion messages are presented to the user using throw. svn path=/nixos/branches/modular-nixos/; revision=15387 |
||
---|---|---|
boot | ||
doc | ||
etc | ||
helpers | ||
installer | ||
system | ||
test | ||
upstart-jobs | ||
default.nix | ||
README | ||
release.nix | ||
STABLE | ||
VERSION |
*** NixOS *** NixOS is a Linux distribution based on the purely functional package management system Nix. More information can be found at http://nixos.org/nixos and in the manual in doc/manual.