git.iko.soy/typeable/nixpkgs
on master help sign in
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).

commita5322efd958cf9fd063f67f4580cffbf70fdb750 authorNikolay Amiantov <ab@fmap.me> dateTue 29 Mar 2016, 17:06 (11 years ago) parentd9b98b6
1 file changed+4−5
pkgs/build-support/build-fhs-userenv/default.nix+4−5
pkgs/build-support/build-fhs-userenv/default.nix+4−5
@@ -1,9 +1,8 @@
1−{ runCommand, lib, writeText, writeScriptBin, stdenv, bash, ruby } :
2−{ env, runScript ? "${bash}/bin/bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } :
1+{ runCommand, lib, writeText, writeScriptBin, stdenv, ruby } :
2+{ env, runScript ? "bash", extraBindMounts ? [], extraInstallCommands ? "", importMeta ? {} } :
33
44let
55 name = env.pname;
6− bash' = "${bash}/bin/bash";
76
87 # Sandboxing script
98 chroot-user = writeScriptBin "chroot-user" ''
@@ -33,7 +32,7 @@ in runCommand name {
3332 runCommand "${name}-shell-env" {
3433 shellHook = ''
3534 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:$CHROOTENV_EXTRA_BINDS"
36− exec ${chroot-user}/bin/chroot-user ${env} ${bash'} -l ${init bash'} "$(pwd)"
35+ exec ${chroot-user}/bin/chroot-user ${env} bash -l ${init "bash"} "$(pwd)"
3736 '';
3837 } ''
3938 echo >&2 ""
@@ -46,7 +45,7 @@ in runCommand name {
4645 cat <<EOF >$out/bin/${name}
4746 #! ${stdenv.shell}
4847 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:\$CHROOTENV_EXTRA_BINDS"
49− exec ${chroot-user}/bin/chroot-user ${env} ${bash'} ${init runScript} "\$(pwd)" "\$@"
48+ exec ${chroot-user}/bin/chroot-user ${env} bash ${init runScript} "\$(pwd)" "\$@"
5049 EOF
5150 chmod +x $out/bin/${name}
5251 ${extraInstallCommands}