···20202121with builtins;
2222let
2323- buildFHSEnv = callPackage ./env.nix { };
2323+ buildFHSEnv = callPackage ./buildFHSEnv.nix { };
24242525- env = buildFHSEnv (removeAttrs args [
2525+ fhsenv = buildFHSEnv (removeAttrs args [
2626 "runScript" "extraInstallCommands" "meta" "passthru" "extraBwrapArgs" "dieWithParent"
2727 "unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc"
2828 "version"
···104104 ro_mounts=()
105105 symlinks=()
106106 etc_ignored=()
107107- for i in ${env}/*; do
107107+ for i in ${fhsenv}/*; do
108108 path="/''${i##*/}"
109109 if [[ $path == '/etc' ]]; then
110110 :
···117117 fi
118118 done
119119120120- if [[ -d ${env}/etc ]]; then
121121- for i in ${env}/etc/*; do
120120+ if [[ -d ${fhsenv}/etc ]]; then
121121+ for i in ${fhsenv}/etc/*; do
122122 path="/''${i##*/}"
123123 # NOTE: we're binding /etc/fonts and /etc/ssl/certs from the host so we
124124 # don't want to override it with a path from the FHS environment.
···221221 echo >&2 ""
222222 exit 1
223223 '';
224224+ inherit args fhsenv;
224225 };
225226} ''
226227 mkdir -p $out/bin