[Nix-dev] Dealing with non-Bash /bin/sh on non-NixOS

Ludovic Courtès ludo at gnu.org
Sat Nov 3 15:24:52 CET 2012


Hello!

A common problem for people trying to use Nix/Nixpkgs/Guix on non-NixOS
distros, especially Debian derivatives, is that their /bin/sh is not
Bash.  On Debian and derivatives, it’s a symlink to /bin/dash.

When building without a chroot, things eventually fail because stdenv,
and sometimes build systems, assume that /bin/sh is Bash.

When enabling ‘build-use-chroot’, things fail because the symlink’s
target is not included in the chroot.

For things to work, people have to set ‘build-use-chroot = false’ and
make /bin/sh a symlink to /bin/bash.  Enabling ‘build-use-chroot’ won’t
work unless /bin/sh is not a symlink *and* is statically-linked.

Is there a better way to approach that problem?

Thanks,
Ludo’.



More information about the nix-dev mailing list