R has a couple of hardcoded calls to /bin/sh
:
https://cs.github.com/wch/r-source/blob/9e7cc705e586cd6f05dd77ac3c50a02fc810757c/src/unix/sys-unix.c#L552
https://cs.github.com/wch/r-source/blob/9e7cc705e586cd6f05dd77ac3c50a02fc810757c/src/unix/sys-unix.c#L631
which are not patched in https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/science/math/R
. I suspect that may cause problems on non-NixOS systems when /bin/sh
(usually symlinked to bash) is old. Is that a valid concern?
What I have in mind is something like
substituteInPlace src/unix/sys-unix.c --replace "/bin/sh" "${lib.makeBinPath [ bash ]}/bash"