Merge pull request #3225 from hrdinka/move-glibc-multi

glibc_multi: move glibc_multi script out of all-packages.nix
This commit is contained in:
Michael Raskin 2014-08-29 01:08:04 +04:00
commit d87b867a24
2 changed files with 35 additions and 30 deletions

View file

@ -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
''

View file

@ -4729,36 +4729,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 { };