[Nix-dev] Updating /etc/nix/nix.conf before building packages during nixos-rebuild

Kirill Elagin kirelagin at gmail.com
Sat May 24 20:01:30 CEST 2014


Well, purity doesn't give any guarantees about reproducibility of build
_process_. It says something only about build _result_.

But, yes, I agree. I'd expect `nix.binaryCaches` to be applied immediately.


--
Кирилл Елагин


On Sat, May 24, 2014 at 2:13 PM, Wout Mertens <wout.mertens at gmail.com>wrote:

> You know, this feels a little wrong.
>
> /etc/nixos+nixpkgs describes the whole system, including how to build it,
> and here the build process will differ depending on previous state.
>
> Wouldn't it make more sense to build  the nix config before building the
> rest? Or at least use the new config for the entire build, installing when
> the build succeeds?
>
> Wout.
> On May 23, 2014 8:39 PM, "Mateusz Kowalczyk" <fuuzetsu at fuuzetsu.co.uk>
> wrote:
>
>> On 05/23/2014 09:44 AM, Luca Bruno wrote:
>> > On 23/05/2014 03:50, Mateusz Kowalczyk wrote:
>> >> Hi,
>> >>
>> >> I saw that Hydra built some packages that I want already, for example
>> Qt
>> >> 4.8.6. I need that and it takes a very long time (and usually OOMs) on
>> >> my machine so I thought, hey, why not just fetch it from Hydra.
>> >>
>> >> I found binaryCaches option but it is set in /etc/nix/nix.conf that's
>> >> generated from /etc/nixos/configuration.nix.
>> >>
>> >> The problem is that even if I set nix.binaryCaches = [ … ]; in my
>> >> configuration.nix, it won't get applied until after the rebuild.
>> Namely,
>> >> nixos-rebuild wants to build Qt (and many others) itself, so it's not
>> >> looking at the binary cache first.
>> >>
>> >> Is there a way to cheat it and generate nix.conf first and only then
>> >> calculate which packages we can fetch and which we have to build?
>> >>
>> >> Notably, manually running
>> >>
>> >> nix-install-package --non-interactive --url
>> >>
>> http://hydra.nixos.org/build/11188799/nix/pkg/qt-4.8.6-i686-linux.nixpkg
>> >>
>> >> installs Qt fine and nixos-rebuild no longer wants to build it itself.
>> >> That's great but there are many packages and I can't try to find each
>> on
>> >> Hydra by hand.
>> >>
>> > nixos-rebuild .... --option binary-caches "http://... ..." should do
>> it.
>> > _______________________________________________
>> > nix-dev mailing list
>> > nix-dev at lists.science.uu.nl
>> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
>> >
>>
>> This does what I want. Perhaps nixos-rebuild manual should mention
>> --options, otherwise the user has to look for binary-caches in Nix
>> manual itself.
>>
>> Thanks
>>
>> --
>> Mateusz K.
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>
> _______________________________________________
> 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/20140524/b31c0e41/attachment.html 


More information about the nix-dev mailing list