[Nix-dev] Disable build-use-chroot on command line

Marco Maggesi maggesi at math.unifi.it
Tue Aug 16 16:04:19 CEST 2011


On Aug 16, 2011, at 3:17 PM, Michael Raskin wrote:

>>> I have some odd hacks that do not work when the setting `build-use-chroot' is true.
>>> Is it possible to disable this setting with a command line switch on the nix-build invocation?
>> 
>> Yes, "nix-build --option build-use-chroot false".  However this doesn't work 
>> when you're building through the Nix daemon.
> 
> Ensuring you don't use Nix daemon is done from root as "export NIX_REMOTE= "

This solves my problem.  Thanks.

> By the way, isn't simply editing /etc/nix.conf build-chroot-dirs (non-NixOS)
> or nix.chrootDirs (NixOS) enough for your goals?

Well, this is in fact what I do.

But since a few other people (beside myself) use this script, I'm doing my best to make it work in all possible situations.

Just for the curious: the script in question servers to build checkpointed versions of HOL Light, it is available from https://web.math.unifi.it/users/maggesi/r.cgi/hol-light-additions/dir?name=Nix

Thanks,
Marco


More information about the nix-dev mailing list