[Nix-dev] [Nix] Feature request for NixOS introspection.

Eelco Dolstra e.dolstra at tudelft.nl
Mon Dec 6 23:04:06 CET 2010


Hi,

On 12/06/2010 07:52 PM, Nicolas Pierron wrote:

> I am trying to bring up a tool to analyze NixOS option and
> automatically detect where options are used.  I already made an
> expression which produce a pdf file
> (nixos/maintainers/option-usage.nix).  

How does it work?  It sounds like a fairly tricky problem (without support in
the evaluator).

> I updated it considering the
> memory consumption in order to benefit from the garbage collector of
> nix expressions.
> 
> Unfortunately, the tryEval primitive has changed since.  

The semantics of tryEval did change once, but I think that was quite a long time
ago...

> When I
> started this script it was catching everything, but now it only catch
> assertions errors.  Sadly, evaluating strictly NixOS configurations
> can lead to unexpected errors, such as throw, bad types, ...

Why do you need to evaluate it strictly?  That seems dangerous (even if you
could catch all exceptions) due to the risk of infinite recursion.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list