treewide: Mass replace 'glibc}/lib' to refer the 'out' output
This commit is contained in:
parent
b56b24f729
commit
a1909d7380
@ -102,7 +102,7 @@ in
|
|||||||
'' + optionalString cfg.ssh.enable ''
|
'' + optionalString cfg.ssh.enable ''
|
||||||
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
|
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 ''
|
boot.initrd.extraUtilsCommandsTest = optionalString cfg.ssh.enable ''
|
||||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cp -r . "$out/libexec/baudline/"
|
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
|
for prog in "$out"/libexec/baudline/baudline*; do
|
||||||
patchelf --interpreter "$interpreter" "$prog"
|
patchelf --interpreter "$interpreter" "$prog"
|
||||||
ln -sr "$prog" "$out/bin/"
|
ln -sr "$prog" "$out/bin/"
|
||||||
|
@ -37,7 +37,7 @@ with stdenv; lib.makeOverridable mkDerivation rec {
|
|||||||
truncate --size=$size $fname
|
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
|
if [ "${stdenv.system}" == "x86_64-linux" ]; then
|
||||||
target_size=$(get_file_size bin/fsnotifier64)
|
target_size=$(get_file_size bin/fsnotifier64)
|
||||||
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
|
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
|
||||||
|
@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
|
|||||||
make install
|
make install
|
||||||
cp -r src/dependencies/xulrunner $out/lib/kiwix
|
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
|
rm $out/bin/kiwix
|
||||||
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
|
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
|||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
|
||||||
patchPhase = ''
|
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
|
sed 's|/lib/x86_64-linux-gnu/|${stdenv.cc.cc}/lib/|g' -i src/libponyc/codegen/genexe.c
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ stdenv.mkDerivation rec {
|
|||||||
# Fix rpath
|
# 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-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
|
# Store new hash
|
||||||
patched_hash=$(md5sum $out/share/df_linux/libs/Dwarf_Fortress | awk '{ print $1 }')
|
patched_hash=$(md5sum $out/share/df_linux/libs/Dwarf_Fortress | awk '{ print $1 }')
|
||||||
|
@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
|
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.out}/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/cupswrapper/brcupsconfpt1
|
||||||
|
|
||||||
mkdir -p $out/lib/cups/filter/
|
mkdir -p $out/lib/cups/filter/
|
||||||
ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw
|
ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw
|
||||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
|||||||
cp -r $TMPDIR/{etc,usr/{bin,lib,share}} $out
|
cp -r $TMPDIR/{etc,usr/{bin,lib,share}} $out
|
||||||
for BIN in $(find $out/bin -type f); do
|
for BIN in $(find $out/bin -type f); do
|
||||||
echo Patching $BIN
|
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
|
# Test our binary to see if it was correctly patched
|
||||||
set +e
|
set +e
|
||||||
|
@ -27,12 +27,12 @@ stdenv.mkDerivation rec {
|
|||||||
# Now we need to patch up the executables and libraries to work on Nix.
|
# 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.
|
# 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
|
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"
|
patchelf --set-rpath "$out/usr/lib/plexmediaserver" "$out/usr/lib/plexmediaserver/$bin"
|
||||||
done
|
done
|
||||||
|
|
||||||
find $out/usr/lib/plexmediaserver/Resources -type f -a -perm -0100 \
|
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
|
# executables need libstdc++.so.6
|
||||||
ln -s "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}/libstdc++.so.6" "$out/usr/lib/plexmediaserver/libstdc++.so.6"
|
ln -s "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}/libstdc++.so.6" "$out/usr/lib/plexmediaserver/libstdc++.so.6"
|
||||||
|
@ -11339,7 +11339,7 @@ in modules // {
|
|||||||
|
|
||||||
patchPhase = optionalString stdenv.isLinux ''
|
patchPhase = optionalString stdenv.isLinux ''
|
||||||
substituteInPlace monotonic.py --replace \
|
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'"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user