···4040 isMultiBuild = multiArch && stdenv.system == "x86_64-linux";
4141 isTargetBuild = !isMultiBuild;
42424343- # list of packages (usually programs) which are only be installed for the
4444- # host's architecture
4343+ # list of packages (usually programs) which match the host's architecture
4444+ # (which includes stuff from multiPkgs)
4545 targetPaths = targetPkgs pkgs ++ (if multiPkgs == null then [] else multiPkgs pkgs);
46464747- # list of packages which are installed for both x86 and x86_64 on x86_64
4848- # systems
4747+ # list of packages which are for x86 (only multiPkgs, only for x86_64 hosts)
4948 multiPaths = multiPkgs pkgsi686Linux;
50495150 # base packages of the chroot
···7675 ];
77767877 ldconfig = writeShellScriptBin "ldconfig" ''
7979- # due to a glibc bug, 64-bit ldconfig complains about patchelf'd 32-bit libraries, so we're using 32-bit ldconfig
8080- exec ${if stdenv.system == "x86_64-linux" then pkgsi686Linux.glibc.bin else pkgs.glibc.bin}/bin/ldconfig -f /etc/ld.so.conf -C /etc/ld.so.cache "$@"
7878+ # due to a glibc bug, 64-bit ldconfig complains about patchelf'd 32-bit libraries, so we use 32-bit ldconfig when we have them
7979+ exec ${if isMultiBuild then pkgsi686Linux.glibc.bin else pkgs.glibc.bin}/bin/ldconfig -f /etc/ld.so.conf -C /etc/ld.so.cache "$@"
8180 '';
82818382 etcProfile = writeText "profile" ''
···251250252251in runCommandLocal "${name}-fhs" {
253252 passthru = {
254254- inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig;
253253+ inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild;
255254 };
256255} ''
257256 mkdir -p $out