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

Ludovic Courtès ludo at gnu.org
Tue Jun 30 11:32:26 CEST 2009


Salut,

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

> On Tue, Jun 30, 2009 at 09:50, Ludovic Courtès<ludo at gnu.org> wrote:
>> Hello,
>>
>> The `modular-nixos' branch introduces `require' statements, which now
>> take a path, e.g.,
>>
>>  require = [ ./nixos/hardware/network/intel-4965agn.nix ];
>>
>> The problem is that the resolution context of this relative path is
>> often problematic.
>
> I don't consider this being a problem.

I do.  The above `require' statement is just a way to say "do whatever
is appropriate for Intel 4965 hardware".  It doesn't matter to me, as a
user, whether this implies loading a file, and where that file actually
resides.

> Can't you use absolute path? /etc/nixos/nixos/hardware/network/intel-4965agn.nix

This is inconvenient IMO.  I would just want it to load
`nixos/hardware/network/intel-4965agn.nix' from the current NixOS
directory, as specified by $NIXOS or `/etc/nixos/nixos'.

>> With the installation, this path is resolved relative to the
>> installation target root (/mnt) whereas `nixos-checkout' stores the
>> NixOS source under /.
>
> The source aren't copied to the target before the end of the
> installation?

I don't think so.

Thanks,
Ludo'.




More information about the nix-dev mailing list