summary refs log tree commit diff
path: root/pkgs/stdenv/nix-linux-static/scripts/add-symlink.sh
blob: ff2716f21d3dc061a513b66395ecf9aa43af77b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
chmod u+w $out/include
(cd $out/include && ln -s $extra/include/* .) || exit 1

cd $out
find . -not -type l -exec $extra2/bin/chmod u+w {} \;
find . -exec $patchelf --interpreter $out/lib/ld-linux.so.2 --shrink-rpath {} \; || true

$extra2/bin/rm -rf bin

$extra2/bin/cat ./lib/libc.so | $extra4/bin/sed "s|/nix/store/[a-z0-9]*-glibc|$out|g" > ./lib/libc.so
$extra2/bin/cat ./lib/libpthread.so | $extra4/bin/sed "s|/nix/store/[a-z0-9]*-glibc|$out|g" > ./lib/libpthread.so

rm $out/lib/*.so*