This is primarily for chroot stores. This might not be useful however since chroot store breaks builds.
This is cleaner, and finally enables writing tests for the nix invoking functions.