[Nix-dev] /bin in chroot builds
Eelco Dolstra
e.dolstra at tudelft.nl
Thu Apr 22 11:11:43 CEST 2010
Hi,
Lluís Batlle i Rossell wrote:
> I noticed the nixos nix.conf includes /bin in the build chroot.
>
> I saw that perl, when using the system() command, it runs /bin/sh "on unix", the
> manual says.
Actually, the system() function in Glibc executes /bin/sh. And there are
numerous shells scripts that refer to /bin/sh. So this is an impure dependency
that's very hard to get rid of.
> In ubuntu, /bin/sh happens to point to /bin/dash, and so that is not able to
> parse a thing like "source $stdenv/setup".
>
> The buildenv package consists of a perl builder calling:
> system("eval \"\$postBuild\"")
Aha. So this should be changed to `system("$ENV{SHELL} -c 'eval $postBuild'")'
or something like that.
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list