On my local nixos machine, `useSandbox = true;` wasn't enabled. This exposed the fact that various scripts weren't shebang-patched. @cleverca22 has provided the fix. cc @peti @domenkozar @Ericson2314
The build relies on /usr/bin/env, which does not exist in chroot build environments: http://hydra.nixos.org/build/51814615. Ping: @dmjio