[Nix-dev] Expressing dependencies on init scripts

Shea Levy shea at shealevy.com
Tue Mar 27 13:59:07 CEST 2012


On 03/26/2012 05:18 PM, Kirill Elagin wrote:
> Please take a look at this bug that Lluís has just fixed: 
> https://nixos.org/websvn/nix/nixos/trunk/modules/config/networking.nix?op=diff&rev=33434&peg=33434 
> <https://nixos.org/websvn/nix/nixos/trunk/modules/config/networking.nix?op=diff&rev=33434&peg=33434>.
> Of course this works now, but there is a deeper problem: Nix couldn't 
> detect that this config referred to nscd's init-script.
>
> It seems to me that nix doesn't have a clear way of expressing such 
> kind of dependencies. Right now the name of the init-script is simply 
> hardcoded. This is what Shea Levy calls "an impurity".
>

It's an interesting problem, slightly compounded by the fact that in 
NixOS there's only one choice for init daemon. Ideally, we'd have 
separate nix expressions for each init script (or have the init script 
be provided as part of the original package), dependent upon which init 
daemon was chosen. Then, depending on how we wanted to do this, we could 
either make statements like the one Lluís just fixed fail when the 
service is not enabled, or automatically enable the service. I've a few 
ideas on a concrete implementation of this, I might put a basic proposal 
forth in a few days.

> --
> ?????? ??????
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120327/69d4b776/attachment.html 


More information about the nix-dev mailing list