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

Ludovic Courtès ludo at gnu.org
Tue Nov 6 22:36:19 CET 2012


Hi,

Eelco Dolstra <eelco.dolstra at logicblox.com> skribis:

> On 03/11/12 15:24, Ludovic Courtès wrote:
>
>> 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.
>
> Where does stdenv assume that /bin/sh is Bash?

Everywhere.  Associative arrays, etc.

The main problem remains that building outside of a chroot on these
distros is likely to bring a number of errors due to impurities.

> A workaround would be to implement this feature request:
> https://github.com/NixOS/nix/issues/24.  This would allow /bin/sh to be
> redirected to whatever you want.

Yes.  What about the more flexible approaches I suggested?

Ludo’.



More information about the nix-dev mailing list