nixpkgs/pkgs/build-support/build-fhs-userenv
Daniel Fullmer 0a8007498f bash: use default PATH in FHS environments
If bash is executed within an environment where PATH is not set, it uses
the DEFAULT_PATH_VALUE compiled into bash to set PATH. In nixpkgs we set
this to /no-such-path by default. This makes sense in a nixpkgs/NixOS
environment since paths like /bin or /usr/bin should not be used.
However, when bash is used inside an FHS environment, this produces
results that differ from distributions which follow the FHS standard.

Before this change:
$ steam-run env -i /bin/bash -c 'echo $PATH'
/no-such-path

After this change:
$ steam-run env -i /bin/bash -c 'echo $PATH'
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
2022-02-27 15:59:39 -08:00
..
chrootenv chrootenv: remove default.nix from src 2022-02-05 03:01:03 -05:00
default.nix build-fhs-userenv: runCommand -> runCommandLocal (#77253) 2020-02-14 20:16:49 +02:00
env.nix bash: use default PATH in FHS environments 2022-02-27 15:59:39 -08:00