@@ -1,4 +1,5 @@
11{
2+ bashInteractive,
23 buildPackages,
34 cacert,
45 callPackage,
@@ -688,6 +689,7 @@ rec {
688689 # Provide a /etc/passwd and /etc/group that contain root and nobody.
689690 # Useful when packaging binaries that insist on using nss to look up
690691 # username/groups (like nginx).
692+ # /bin/sh is fine to not exist, and provided by another shim.
691693 fakeNss = symlinkJoin {
692694 name = "fake-nss";
693695 paths = [
@@ -705,6 +707,12 @@ rec {
705707 ];
706708 };
707709
710+ # This provides /bin/sh, pointing to bashInteractive.
711+ binSh = runCommand "bin-sh" {} ''
712+ mkdir -p $out/bin
713+ ln -s ${bashInteractive}/bin/bash $out/bin/sh
714+ '';
715+
708716 # Build an image and populate its nix database with the provided
709717 # contents. The main purpose is to be able to use nix commands in
710718 # the container.