[Nix-dev] How to convert non string options to documentation String ?
Marc Weber
marco-oweber at gmx.de
Mon Mar 9 14:36:06 CET 2009
> Many solutions exist for this problem:
>
> - The best one would be to implement a prim-op to keep the original
> code (with a relative identation) almost as your are doing except that
> we don't have to write the same code twice which is evaluated by
> default except if it is the argument of another primop
>
> default = ~keepDoc~ [ config.boot.ways.grub ];
>
> getDoc opt.default
I've had a similar idea as well. Didn't knew how to implement it.
>
> - Add a defaultPP attribute which contains the string version of the
> value. Then:
>
> if opt ? defaultPP then opt.defaultPP else opt.default
>
> I suggest you to use the defaultPP solution because adding extra
> function before the value of the default attribute could be
> missleading (IMO).
default = config.foo;
defaultPP = "config.foo";
will be the simplest solution we should use for now. I agree.
So how is done at the moment?
I've seen that the list of options is gone from
http://nixos.org/releases/nixos/unstable/manual/ ?
Marc Weber
More information about the nix-dev
mailing list