[Nix-dev] Re: NixOS: New scheme

Ludovic Courtès ludo at gnu.org
Mon Dec 22 16:02:33 CET 2008


Hello!

In good faith I was trying to write an Upstart job for PulseAudio using
this new style, but I'm afraid it's beyond my capabilities...

"Nicolas Pierron"
<nicolas.b.pierron at gmail.com> writes:

> The implementation need all other module used to implement it and the
> options defined by this module with the attribute named "require"

I don't understand this sentence.

>   require = [
>     # options needed for the implementation
>     (import ../upstart-jobs/default.nix)

This happens to be commented out, e.g., in `upstart-jobs/cron.nix' in
`trunk'.  Why would it be needed?

>     # options defined by this module
>     options
>   ];

Interestingly, options defined by this module are *provided*, not
*required*, so why does one need to list them in the `require'
attribute?!

Furthermore, how does that `require' magic work?  It appears that
`fixOptionSetsFun' (from `lib/default.nix' in Nixpkgs) plays an
important role, but I don't understand it, and the comment above isn't
very helpful either to me.

Thanks,
Ludo'.




More information about the nix-dev mailing list