···40 isMultiBuild = multiArch && stdenv.system == "x86_64-linux";
41 isTargetBuild = !isMultiBuild;
4243- # list of packages (usually programs) which are only be installed for the
44- # host's architecture
45 targetPaths = targetPkgs pkgs ++ (if multiPkgs == null then [] else multiPkgs pkgs);
4647- # list of packages which are installed for both x86 and x86_64 on x86_64
48- # systems
49 multiPaths = multiPkgs pkgsi686Linux;
5051 # base packages of the chroot
···76 ];
7778 ldconfig = writeShellScriptBin "ldconfig" ''
79- # due to a glibc bug, 64-bit ldconfig complains about patchelf'd 32-bit libraries, so we're using 32-bit ldconfig
80- 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 "$@"
81 '';
8283 etcProfile = writeText "profile" ''
···251252in runCommandLocal "${name}-fhs" {
253 passthru = {
254- inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig;
255 };
256} ''
257 mkdir -p $out
···40 isMultiBuild = multiArch && stdenv.system == "x86_64-linux";
41 isTargetBuild = !isMultiBuild;
4243+ # list of packages (usually programs) which match the host's architecture
44+ # (which includes stuff from multiPkgs)
45 targetPaths = targetPkgs pkgs ++ (if multiPkgs == null then [] else multiPkgs pkgs);
4647+ # list of packages which are for x86 (only multiPkgs, only for x86_64 hosts)
048 multiPaths = multiPkgs pkgsi686Linux;
4950 # base packages of the chroot
···75 ];
7677 ldconfig = writeShellScriptBin "ldconfig" ''
78+ # 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
79+ exec ${if isMultiBuild then pkgsi686Linux.glibc.bin else pkgs.glibc.bin}/bin/ldconfig -f /etc/ld.so.conf -C /etc/ld.so.cache "$@"
80 '';
8182 etcProfile = writeText "profile" ''
···250251in runCommandLocal "${name}-fhs" {
252 passthru = {
253+ inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild;
254 };
255} ''
256 mkdir -p $out