[Nix-dev] [submission] boost-1.35.0.nix

Arie Middelkoop ariem at cs.uu.nl
Mon Jun 16 10:35:09 CEST 2008


> Is there a way to tell nix-build that it should re-use a previously
> generated working directory? I realize that this would make the build
> less clean, but just unpacking that huge boost library archive takes a
> while on my machine and it would be nice if that time could be saved
> during package development.

You can create a separate nix expression representing the unpacked boost 
library, do perhaps a bit of preprocessing, and assign it to an 
attribute, and then in your main nix expression copy the files from that 
attribute. Then unpacking occurs only once. This is a bit overkill for 
just package development...

A trick that you can use during development is telling nix-build to 
retain your build directory. And then while your new build is running, 
quickly copy the files from the old build directory to the new 
directory. Hopefully in time before it does the main "make", such that 
it resumes where it left previously.

Arie



More information about the nix-dev mailing list