Hello,

I'd like to upstream this patch to Nix service and hear your thoughts on the matter.

The issue is that there are some packages that fail to build even on realtively powerful machine due to resource exhaustion - not enough RAM.

The solution for that is to extract and build the derivation on block device instead of tmpfs.

The solution for this is to specify the environment variable TMPDIR​ and point it e.g. to `/var/tmp​`.

Unfortunately I'm not aware of any other way how to specify I'd like to build just this package in other directory (other than `/tmp`).

Also is there some other way how Guix handles this issue? I might be also used in Nix.

FIY the reason I have to use Nix is to build the Android image [1]

https://github.com/danielfullmer/robotnix

----
Petr