[Nix-dev] Re: make -j<n> howto?

Marc Weber marco-oweber at gmx.de
Tue Jun 17 23:30:55 CEST 2008


So we all agree on
a) nix should keep pure the way it is, but maybe optionally allow b)?
b) it would be nice to have some impure features for developement only
   making the user /sys admin responsible for verifying that the build
   will not differ (better to say the sys admin accepts by enabling those
   features that it the result will /might differ but doesn't care
   explicitely)
c) It's not that easy because not all expressions are using 
   gcc and make
   So there is no general rule for everything?

So may be we can determine some interesting env vars which could be
overridden without changing hashes but when sticking to a) set them to
default values guaranteeing purity?
One such env var would be NUM_CORES which would be set to 1 by default
and can be passed to make -j. Can you think of more ?
I think NUM_CORES is very interesting for builds such as openoffice or ghc.
Maybe this package can then be marked as beeing impure somehow?

Think of this feature beeing implemented.. How should nix behave?
Say you have 2 cores and you want to build A and B not depending on each
other. So nix can build A with two cores, then B with two cores or it
can build them at the same time passing NUM_CORES 1 or NUM_CORES 2

if talking about this.. I've always set maxJobs=2 because 1 job might be
downloading not utilizing cpu at all and I think this can slow down
overall build more than switching two threads (one might be waiting due
to disk IO anyway?) But I'm no expert here

>  makes me wonder: is it possible to get SVN access? It feels like posting
>  | code and/or patches to the mailing list is not the best way to
Yes, ask niksnut directly. Maybe he has already read your request here.

Marc Weber



More information about the nix-dev mailing list