NixOS/nixpkgs — pull request #1870 by ttuegel (2014-03-03 14:22:06+00:00)
Title: glibc: don't assume /bin/sh is bash

The expression for glibc incorrectly assumes that `/bin/sh` is bash. That's fine on NixOS, but when running Nix on other distributions, the scripts shipped with glibc may be broken. This is particularly bad on Debian-based systems, where `/bin/sh` is dash!

The solution I propose is to use `/usr/bin/env bash` instead. This works on NixOS, and the location of `env` is standardized by the LSB specification, so it should work on ~all distributions. This fixes several builds that were failing on Ubuntu because `ldd` was broken.

Thanks to @ktosiek for pointing out that `ldd` is a script and that `/bin/sh` is not bash on Ubuntu!