[Nix-dev] dead sources
mathijs at bluescreen303.nl
Sun Jan 6 19:38:32 CET 2013
On Sun, Jan 6, 2013 at 7:29 PM, Shea Levy <shea at shealevy.com> wrote:
> On Jan 6, 2013, at 13:19, Mathijs Kwik <mathijs at bluescreen303.nl> wrote:
>> On Sun, Jan 6, 2013 at 6:10 PM, Michael Raskin <7c6f434c at mail.ru> wrote:
>>>> But instead of just having to wait for a while, the whole experience
>>>> was a lot less pleasant, as the build process errored out every hour
>>>> or so, because of missing source downloads. As I was not present the
>>>> whole time, but only check/fix/restarted occasionally, I'm not even
>>>> halfway done yet :(
>>> I guess specifying -k (--keep-going) flag to nix-build would help.
>>> nix-build /etc/nixos/nixos -k -A system
>> Didn't think of that, but it might indeed get me a bit further.
>> Depends a bit on how high/low in the dependency-tree the missing
>> source sits though.
>> For example if some X11 source is not found, building anything
>> graphical will be skipped.
> But the sources for the graphical stuff will still be downloaded
Ok, that's close then, somewhat of a 2-phase project :)
If I understand correctly:
It will guarantee that everything that can be downloaded gets
downloaded, and everything that can be built with that, gets built.
So if I run again after that, I will hit all the download issues at
once. Fixing these will guarantee a smooth build afterwards
(sources-wise, of course other issues can come up)
>>>> I think it's important to be able to build nixos/nixpkgs fully from
>>>> source, or at least know upfront if any download-related errors will
>>>> I can think of 3 ways which could improve the current situation.
>>>> a) --download-only option for nix-build
>>>> That way, before attempting long builds, I can make sure I have all
>>>> the sources, and don't even need an internet connection during the
>>>> real build.
>>> I am not sure how the flags get passed around inside...
>>> Right now you could use nix-reduce-build script inside nix repository...
>>> Among its functionality is
>>> nix-reduce-build /etc/nixos/nixos:-A:system -- nix-self-fixed://
>>> It is not installed by default because it can do so many things that its
>>> precise purpose is unclear.
>> Didn't know about it. Looks like a useful tool :)
>>> It looks like NixOS system refers to some downloads that are not needed
>>> even when building from near-scratch (and so some failures from
>>> nix-reduce-build are not significant), but it keeps trying the remaining
>>> things on single failures so it downloads whatever it is possible.
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
More information about the nix-dev