treewide: Mass replace 'glibc}/lib' to refer the 'out' output

This commit is contained in:
Tuomas Tynkkynen 2016-01-24 09:29:16 +02:00
parent b56b24f729
commit a1909d7380
10 changed files with 12 additions and 12 deletions

View File

@ -102,7 +102,7 @@ in
'' + optionalString cfg.ssh.enable ''
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
cp -pv ${pkgs.glibc}/lib/libnss_files.so.* $out/lib
cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib
'';
boot.initrd.extraUtilsCommandsTest = optionalString cfg.ssh.enable ''

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
cp -r . "$out/libexec/baudline/"
interpreter="$(echo ${stdenv.glibc}/lib/ld-linux*)"
interpreter="$(echo ${stdenv.glibc.out}/lib/ld-linux*)"
for prog in "$out"/libexec/baudline/baudline*; do
patchelf --interpreter "$interpreter" "$prog"
ln -sr "$prog" "$out/bin/"

View File

@ -37,7 +37,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
truncate --size=$size $fname
}
interpreter=$(echo ${stdenv.glibc}/lib/ld-linux*.so.2)
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
if [ "${stdenv.system}" == "x86_64-linux" ]; then
target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64

View File

@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
make install
cp -r src/dependencies/xulrunner $out/lib/kiwix
patchelf --set-interpreter ${glibc}/lib/ld-linux${optionalString (stdenv.system == "x86_64-linux") "-x86-64"}.so.2 $out/lib/kiwix/xulrunner/xulrunner
patchelf --set-interpreter ${glibc.out}/lib/ld-linux${optionalString (stdenv.system == "x86_64-linux") "-x86-64"}.so.2 $out/lib/kiwix/xulrunner/xulrunner
rm $out/bin/kiwix
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation {
checkTarget = "test";
patchPhase = ''
sed 's|/usr/lib/x86_64-linux-gnu/|${glibc}/lib/|g' -i src/libponyc/codegen/genexe.c
sed 's|/usr/lib/x86_64-linux-gnu/|${glibc.out}/lib/|g' -i src/libponyc/codegen/genexe.c
sed 's|/lib/x86_64-linux-gnu/|${stdenv.cc.cc}/lib/|g' -i src/libponyc/codegen/genexe.c
'';

View File

@ -194,7 +194,7 @@ stdenv.mkDerivation rec {
# Fix rpath
patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.glibc ]}:$out/share/df_linux/libs" $out/share/df_linux/libs/Dwarf_Fortress
patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 $out/share/df_linux/libs/Dwarf_Fortress
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/share/df_linux/libs/Dwarf_Fortress
# Store new hash
patched_hash=$(md5sum $out/share/df_linux/libs/Dwarf_Fortress | awk '{ print $1 }')

View File

@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/cupswrapper/brcupsconfpt1
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/cupswrapper/brcupsconfpt1
mkdir -p $out/lib/cups/filter/
ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
cp -r $TMPDIR/{etc,usr/{bin,lib,share}} $out
for BIN in $(find $out/bin -type f); do
echo Patching $BIN
patchelf --set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" --set-rpath "${glibc}/lib:${gcc.cc}/lib:${libuuid}/lib:$out/lib" $BIN
patchelf --set-interpreter "${glibc.out}/lib/ld-linux-x86-64.so.2" --set-rpath "${glibc.out}/lib:${gcc.cc}/lib:${libuuid}/lib:$out/lib" $BIN
# Test our binary to see if it was correctly patched
set +e

View File

@ -27,12 +27,12 @@ stdenv.mkDerivation rec {
# Now we need to patch up the executables and libraries to work on Nix.
# Side note: PLEASE don't put spaces in your binary names. This is stupid.
for bin in "Plex Media Server" "Plex DLNA Server" "Plex Media Scanner"; do
patchelf --set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" "$out/usr/lib/plexmediaserver/$bin"
patchelf --set-interpreter "${glibc.out}/lib/ld-linux-x86-64.so.2" "$out/usr/lib/plexmediaserver/$bin"
patchelf --set-rpath "$out/usr/lib/plexmediaserver" "$out/usr/lib/plexmediaserver/$bin"
done
find $out/usr/lib/plexmediaserver/Resources -type f -a -perm -0100 \
-print -exec patchelf --set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" '{}' \;
-print -exec patchelf --set-interpreter "${glibc.out}/lib/ld-linux-x86-64.so.2" '{}' \;
# executables need libstdc++.so.6
ln -s "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}/libstdc++.so.6" "$out/usr/lib/plexmediaserver/libstdc++.so.6"

View File

@ -11339,7 +11339,7 @@ in modules // {
patchPhase = optionalString stdenv.isLinux ''
substituteInPlace monotonic.py --replace \
"ctypes.util.find_library('c')" "'${stdenv.glibc}/lib/libc.so.6'"
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
'';
};