Revert "Remove PATH assumption from fhs-userenv."

This reverts commit 2f26b82411ea93349d375ea3b5d833b04a455972.

This breaks terminfo in Bash for some reason (i.e. TAB and other
special keys).

+4 -5
+4 -5
pkgs/build-support/build-fhs-userenv/default.nix
··· 1 - { runCommand, lib, writeText, writeScriptBin, stdenv, bash, ruby } : 2 - { env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } : 3 4 let 5 name = env.pname; 6 - bash' = "${bash}/bin/bash"; 7 8 # Sandboxing script 9 chroot-user = writeScriptBin "chroot-user" '' ··· 33 runCommand "${name}-shell-env" { 34 shellHook = '' 35 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:$CHROOTENV_EXTRA_BINDS" 36 - exec ${chroot-user}/bin/chroot-user ${env} ${bash'} -l ${init bash'} "$(pwd)" 37 ''; 38 } '' 39 echo >&2 "" ··· 46 cat <<EOF >$out/bin/${name} 47 #! ${stdenv.shell} 48 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:\$CHROOTENV_EXTRA_BINDS" 49 - exec ${chroot-user}/bin/chroot-user ${env} ${bash'} ${init runScript} "\$(pwd)" "\$@" 50 EOF 51 chmod +x $out/bin/${name} 52 ${extraInstallCommands}
··· 1 + { runCommand, lib, writeText, writeScriptBin, stdenv, ruby } : 2 + { env, runScript ? "bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } : 3 4 let 5 name = env.pname; 6 7 # Sandboxing script 8 chroot-user = writeScriptBin "chroot-user" '' ··· 32 runCommand "${name}-shell-env" { 33 shellHook = '' 34 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:$CHROOTENV_EXTRA_BINDS" 35 + exec ${chroot-user}/bin/chroot-user ${env} bash -l ${init "bash"} "$(pwd)" 36 ''; 37 } '' 38 echo >&2 "" ··· 45 cat <<EOF >$out/bin/${name} 46 #! ${stdenv.shell} 47 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:\$CHROOTENV_EXTRA_BINDS" 48 + exec ${chroot-user}/bin/chroot-user ${env} bash ${init runScript} "\$(pwd)" "\$@" 49 EOF 50 chmod +x $out/bin/${name} 51 ${extraInstallCommands}