From d82c95cf170b9c46ff64afa283cb15b8cd4f5c3d Mon Sep 17 00:00:00 2001 From: Christoph Hrdinka Date: Thu, 10 Jul 2014 09:55:50 +0200 Subject: [PATCH] glibc_multi: move glibc_multi script out of all-packages.nix --- .../libraries/glibc/2.19/multi.nix | 31 +++++++++++++++++ pkgs/top-level/all-packages.nix | 34 +++---------------- 2 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 pkgs/development/libraries/glibc/2.19/multi.nix diff --git a/pkgs/development/libraries/glibc/2.19/multi.nix b/pkgs/development/libraries/glibc/2.19/multi.nix new file mode 100644 index 000000000000..ad4a34152b65 --- /dev/null +++ b/pkgs/development/libraries/glibc/2.19/multi.nix @@ -0,0 +1,31 @@ +{ runCommand, glibc, glibc32 +}: + +runCommand "${glibc.name}-multi" + { inherit glibc32; + glibc64 = glibc; + } + '' + 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 + + # fixing ldd RLTDLIST + rm $out/bin + cp -rs $glibc64/bin $out + chmod u+w $out/bin + rm $out/bin/ldd + sed -e "s|^RTLDLIST=.*$|RTLDLIST=\"$out/lib/ld-2.19.so $out/lib/32/ld-linux.so.2\"|g" \ + $glibc64/bin/ldd > $out/bin/ldd + chmod 555 $out/bin/ldd + + rm $out/include + cp -rs $glibc32/include $out + chmod -R u+w $out/include + cp -rsf $glibc64/include $out + '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f3714770c5f5..edf75394cb9a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4634,36 +4634,10 @@ let glibcInfo = callPackage ../development/libraries/glibc/2.19/info.nix { }; - glibc_multi = - runCommand "${glibc.name}-multi" - { glibc64 = glibc; - glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc; - } - '' - 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 - - # fixing ldd RLTDLIST - rm $out/bin - cp -rs $glibc64/bin $out - chmod u+w $out/bin - rm $out/bin/ldd - sed -e "s|^RTLDLIST=.*$|RTLDLIST=\"$out/lib/ld-2.19.so $out/lib/32/ld-linux.so.2\"|g" \ - $glibc64/bin/ldd > $out/bin/ldd - chmod 555 $out/bin/ldd - - rm $out/include - cp -rs $glibc32/include $out - chmod -R u+w $out/include - cp -rsf $glibc64/include $out - '' # */ - ; + glibc_multi = callPackage ../development/libraries/glibc/2.19/multi.nix { + inherit glibc; + glibc32 = (import ./all-packages.nix {system = "i686-linux";}).glibc; + }; glm = callPackage ../development/libraries/glm { };