Yes, you're right about the statically linked shell, or I have to bind mount /lib into the chroot environment as well, introducing many more impurities.
Now that I'm thinking about this: It almost sounds like a good idea to implement a feature in Nix providing a static shell in /bin/sh for any Nix chroot build (or a bash shell with its required libraries included). Maybe this also provides a solution for platforms not having bash in /bin/sh, such as Ubuntu/Debian (with dash as the default /bin/sh shell), or FreeBSD. I could also be more creative -- e.g. running nix-daemon in a chroot providing a "pure" environment. But doing that is a bit too much effort for me. :P ________________________________________ From: [email protected] [[email protected]] on behalf of Eelco Dolstra [[email protected]] Sent: Friday, December 28, 2012 6:58 PM To: [email protected] Subject: Re: [Nix-dev] chroot builds on other Linux platforms Hi, On 28/12/12 18:41, Sander van der Burg - EWI wrote: > A possible solution is to bind mount a different directory from my host system > (only containing the shell) into the the chroot environment. It would have to be a statically linked shell, otherwise you'll need /lib as well. > Is there an option to achieve this, or must Nix be extended to do this? It's not currently possible, see https://github.com/NixOS/nix/issues/24. -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
