diff --git a/pkgs/build-support/build-fhs-chrootenv/env.nix b/pkgs/build-support/build-fhs-chrootenv/env.nix index 3acb0c8e6b7d..a245778bf386 100644 --- a/pkgs/build-support/build-fhs-chrootenv/env.nix +++ b/pkgs/build-support/build-fhs-chrootenv/env.nix @@ -52,6 +52,14 @@ let gnutar gzip bzip2 xz glibcLocales ]; + etcProfile = nixpkgs.writeText "profile" '' + export PS1='${name}-chrootenv:\u@\h:\w\$ ' + export LOCALE_ARCHIVE='/usr/lib${if isMultiBuild then "64" else ""}/locale/locale-archive' + export LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib:/lib:/lib64 + export PATH='/usr/bin:/usr/sbin' + ${profile} + ''; + # Compose /etc for the chroot environment etcPkg = nixpkgs.stdenv.mkDerivation { name = "${name}-chrootenv-etc"; @@ -60,13 +68,7 @@ let cd $out/etc # environment variables - cat >> profile <