[Nix-dev] Re: Nixos: mkOverride

Nicolas Pierron nicolas.b.pierron at gmail.com
Tue Mar 3 01:13:05 CET 2009


Hello,

On Mon, Mar 2, 2009 at 23:04, Ludovic Courtès <ludo at gnu.org> wrote:
> Nicolas Pierron
> <nicolas.b.pierron at gmail.com> writes:
>
>> Priorities are higher it the priority number is lesser than the other.
>>  All higher priorities values are merged together and lower priority
>> values are ignored (enable options).
>
> My first reaction is that this is fragile because priorities have
> non-lexical scope, meaning that one can't tell from looking at a file
> what will end up in the final derivation.

I think, this kind of problem is related to early assumptions which
could be useful to factor code but painful to allow modifications.
The mkOverride is fragile as the priorities are not defined relatively
to other imported files.  IMO, mkOverride is only justified for enable
flags.  I do NOT recommend this for NixOS expressions as this can be
implemented by just creating another option which override the
previous definition.

I don't have a good understanding of Michael Raskin work but this
seems to be an easy solution to solve his problem.  Unfortunately this
is not the ultimate solution.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron
- If you are doing something twice then you should try to do it once.



More information about the nix-dev mailing list