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

Nicolas Pierron nicolas.b.pierron at gmail.com
Mon Nov 19 01:37:23 CET 2012


Hi,

There is no point at providing a restrictive shell except for a few
cases where we are looking for correctness or optimization. The only
thing were such change might benefit is to highlight that some program
depend on bash, by breaking them silently. So If you want to do such
change, do it as a per project basis, for packages which have been
fully verified but certainly not as a global modification.

On Fri, Nov 9, 2012 at 10:49 AM, Michael Raskin <7c6f434c at mail.ru> wrote:
>>> How do you test packages locally with /bin/sh pointing to Dash on NixOS?
>>> I had no idea that's possible.

Currently derivations are builds with the patchShebang function which
lookup up the binary name in the PATH and substitute it.  So the
choice between dash and bash will depend on the PATH order.

Personally, if such choice is made, I think I will do the same thing
as I did on every Ubuntu, namely undoing this conservative bad choice
of staying outdated.  I am using both zsh and bash, and staying
decades in the past to respect POSIX is a bad choice, especially if
bash is POSIX compliant.  To give a comparison, this is exactly like
saying, I won't use this web browser because it implements features
which are not yet standardized.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/


More information about the nix-dev mailing list