[Nix-dev] LLVM builds on Hydra but not locally

Ludovic Courtès ludo at gnu.org
Mon Dec 16 13:56:16 CET 2013


Eelco Dolstra <eelco.dolstra at logicblox.com> skribis:

> On 15/12/13 19:14, James Cook wrote:
>
>> Thanks for pointing out the option, though; somehow I had assumed
>> NixOS enabled that by default... is there a reason not to?
>
> Yes, chroot builds are slow.  https://github.com/NixOS/nix/issues/179

That reads:

--8<---------------cut here---------------start------------->8---
with import <nixpkgs> {};
with lib;
let deps = map (n: runCommand "depM-${toString n}" {} "touch $out") (range 1 100);
in runCommand "foo" { x = deps; } "touch $out"

(i.e. a trivial build with 100 trivial dependencies) takes 4.7s to build on my laptop without chroot, but 39.6s
with chroot.
--8<---------------cut here---------------end--------------->8---

How representative of real life is it?

Not much I presume.  When you do have 100 derivations to build, their
body will typically take longer than ‘touch $out’.  At this point, the
overhead shouldn’t matter this much.

But it would matter when using Nix as a Make replacement.

Ludo’.



More information about the nix-dev mailing list