[Nix-dev] Re: Non-root packaging system + stdenvNative and replace-literal

Ludovic Courtès ludo at gnu.org
Wed Feb 23 13:40:15 CET 2011


Hi,

[...]

>>> I've been hacking around in that direction but need some assistance to
>>> get going. First thing I tried was to play with patching
>>> pkgs/stdenv/default.nix so that stdenv=stdenvNative or stdenvNix,
>>
>> Yes, that should work, assuming you mean changing this line:
>>
>>  if stdenvType == "i686-linux" then stdenvLinux else
>>
>> to
>>
>>  if stdenvType == "i686-linux" then stdenvNative else
>>
>> (or the same for x86_64-linux.)
>
> Yes, though I just took the more radical approach.

I wonder if using ‘stdenvNative’ is a real win.

In the short term, there’s an advantage: fewer packages are
downloaded/built, resulting in lower disk usage.

But in the longer term, if you keep using Nix over several months or
years, then you get to fill your Nix store anyway and the space
advantage becomes less and less important (because ‘stdenv’ is seldom
upgraded, compared to, say, Python or the various apps/libraries you
would use).

More importantly, ‘stdenvNative’ is likely to yield to unreproducible
builds given that important software components escape Nix.

Thanks,
Ludo’.




More information about the nix-dev mailing list