sys-apps/nix: fix nix bootstrap, bug #693482
Fix `nix-channel --update` does not work on freshly-installed nix.
`nix-channel --update` does a few main things:
1. fetch new tarball with nix expressions
2. unpack that tarball as part of the build system using
a shell script derived by unpack-channel.nix.
3. install the result into /nix/store
[2.] fails because tarball unpacking runs in a sandboxed environment
in a container with /nix/store and /bin/sh mounted.
unpack-channel.nix needs bash, tar and xz binaries in PATH.
These are normally provided by bash, tar and xz packages from /nix/store.
Unfortunately bash, tar and xz packages are not yet fetched as we
only have nix installed without nixpkgs tree.
1. we patch unpack-channel.nix to only require 'sh'
2. we use /bin/sh as a static busybox and point nix at it:
./configure --with-sandbox-shell=/bin/busybox
Reported-by: Kirill Zaborsky
Closes: https://bugs.gentoo.org/693482
Bug: https://github.com/NixOS/nix/issues/2673
Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>