diff --git a/pkgs/development/libraries/glibc/multi.nix b/pkgs/development/libraries/glibc/multi.nix index b5b4eabe9c74..0d7bed99f22f 100644 --- a/pkgs/development/libraries/glibc/multi.nix +++ b/pkgs/development/libraries/glibc/multi.nix @@ -3,32 +3,26 @@ let nameVersion = builtins.parseDrvName glibc.name; + glibc64 = glibc; in runCommand "${nameVersion.name}-multi-${nameVersion.version}" - { inherit glibc32; - glibc64 = glibc; - } + { outputs = [ "dev" "out" "bin" ]; } # TODO: no static version here (yet) '' - mkdir -p $out - ln -s $glibc64/* $out/ - - rm $out/lib $out/lib64 - mkdir -p $out/lib - ln -s $glibc64/lib/* $out/lib - ln -s $glibc32/lib $out/lib/32 - ln -s lib $out/lib64 + mkdir -p "$out/lib" + ln -s '${glibc64.out}'/lib/* "$out/lib" + ln -s '${glibc32.out}/lib' "$out/lib/32" + ln -s lib "$out/lib64" # fixing ldd RLTDLIST - rm $out/bin - cp -rs $glibc64/bin $out - chmod u+w $out/bin - rm $out/bin/ldd + mkdir -p "$bin/bin" + cp -s '${glibc64.bin}'/bin/* "$bin/bin/" + rm "$bin/bin/ldd" sed -e "s|^RTLDLIST=.*$|RTLDLIST=\"$out/lib/ld-linux-x86-64.so.2 $out/lib/32/ld-linux.so.2\"|g" \ - $glibc64/bin/ldd > $out/bin/ldd - chmod 555 $out/bin/ldd + '${glibc64.bin}/bin/ldd' > "$bin/bin/ldd" + chmod +x "$bin/bin/ldd" - rm $out/include - cp -rs $glibc32/include $out - chmod -R u+w $out/include - cp -rsf $glibc64/include $out + mkdir "$dev" + cp -rs '${glibc32}'/include "$dev/" + chmod +w -R "$dev" + cp -rsf '${glibc64}'/include "$dev/" ''