[Nix-dev] Resolution context of `require' paths

Eelco Dolstra e.dolstra at tudelft.nl
Fri Jul 10 14:22:17 CEST 2009


Hi,

Nicolas Pierron wrote:

> The issue comes from here.  Such file implies that you will have to
> maintain a file which contains every modules in addition to the file
> module-list.nix which was generated.  The reason that the generated
> method have been forgotten is that Eelco does not want to create
> multiple module directories (which I see as a lack of modularity in
> our writing).  The module-list.nix file was generated by copying the
> filename into a list.  The current proposal implies that you can have
> multiple identifiers for one filename which I consider to be difficult
> to maintain because you won't catch the error if the file is not used.
>  Moreover such file will be similar to all-packages.nix because it
> will become a catch-all and the center of all modifications.
> 
> The syntax issue comes from the point that I want to generate such
> file.  I want to generate a module-index.nix file at the root of the
> module directory which is based on what is found inside each module.
...
> --- in sshd.nix
> names = [ module.sshd ];
> groups = [ module.list.default module.list.minimal ];
> 
> names = {
>   sshd = null;
> 
> };
> 
> --- in intel.nix
> names = [ module.intel4965agn module.intel3965abg ];
> groups = [ module.list.firmwares.intel ];

To me this seems like a solution in search of a problem.  As I said in a
previous message, adding the filename of the module to module-list.nix isn't
much of a burden, and no harder than the alternatives.

Besides, these "groups" are views on the sets of modules, and since there could
be any number of such views, it seems inappropriate to have them in the modules
themselves.  If you want a new view (like "minimal"), just create a file listing
all the modules you want.  That's also what module-list.nix is: simply a default
set of NixOS modules for convenience.

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



More information about the nix-dev mailing list