replace ${stdenv.cc.cc}/lib occurences

This commit is contained in:
Nikolay Amiantov 2016-04-30 23:56:43 +03:00
parent 3994a236bb
commit 87ebab128a
30 changed files with 48 additions and 48 deletions

View File

@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
ln -s $path/lib/*.so* $out/lib/
done
ln -s ${stdenv.cc.cc}/lib/libstdc++.so.6 $out/lib/
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
mkdir $out/bin
ln -s $out/renoise $out/bin/renoise

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
echo ${libPath}
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
--set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$out/sublime/sublime_text
'';

View File

@ -37,7 +37,7 @@ in let
for i in sublime_text plugin_host crash_reporter; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
--set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$i
done
@ -57,7 +57,7 @@ in let
--set NIX_REDIRECTS ${builtins.concatStringsSep ":" redirects}
# Without this, plugin_host crashes, even though it has the rpath
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl.out}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl.out}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
'';
};
in stdenv.mkDerivation {

View File

@ -76,11 +76,11 @@ stdenv.mkDerivation rec {
cp opt/google/talkplugin/*.so $plugins
for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do
patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.cc xorg.libX11 ]}:${stdenv.cc.cc}/lib64" $plugins/$i
patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.cc xorg.libX11 ]}:${stdenv.cc.cc.lib}/lib64" $plugins/$i
done
for i in libgoogletalkremoting.so libnpo1d.so; do
patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.cc}/lib64" $plugins/$i
patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.cc.lib}/lib64" $plugins/$i
done
mkdir -p $out/libexec/google/talkplugin
@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpathProgram}:${stdenv.cc.cc}/lib64" \
--set-rpath "${rpathProgram}:${stdenv.cc.cc.lib}/lib64" \
$out/libexec/google/talkplugin/GoogleTalkPlugin
# Generate an LD_PRELOAD wrapper to redirect execvp() calls to

View File

@ -36,7 +36,7 @@ let
xcbutilkeysyms
systemd
mesa_noglu
] + ":${stdenv.cc.cc}/lib64";
] + ":${stdenv.cc.cc.lib}/lib64";
src =
if stdenv.system == "x86_64-linux" then

View File

@ -36,7 +36,7 @@ let
xorg.libXrandr
xorg.libXrender
xorg.libXtst
] + ":${stdenv.cc.cc}/lib64";
] + ":${stdenv.cc.cc.lib}/lib64";
src =
if stdenv.system == "x86_64-linux" then

View File

@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out"/bin
cat > "$out"/bin/eagle << EOF
#!${stdenv.shell}
export LD_LIBRARY_PATH="${stdenv.cc.cc}/lib:${libPath}"
export LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib:${libPath}"
export LD_PRELOAD="$out/lib/eagle_fixer.so"
export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"
exec "$dynlinker" "$out/eagle-${version}/bin/eagle" "\$@"

View File

@ -7,7 +7,7 @@ let
gmp4
ncurses
zlib
] + ":${stdenv.cc.cc}/lib64";
] + ":${stdenv.cc.cc.lib}/lib64";
url = "https://github.com/GaloisInc/saw-script/releases/download";

View File

@ -7,7 +7,7 @@ let
libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc gtk gdk_pixbuf atk pango glib cairo
freetype fontconfig libxml2 gnome2.gtksourceview
] + ":${stdenv.cc.cc}/lib64";
] + ":${stdenv.cc.cc.lib}/lib64";
patchExe = x: ''
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \

View File

@ -32,7 +32,7 @@ let
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
unpackPhase = ''
sh $src --keep --noexec

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation {
];
preBuild = ''
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/"
export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc.lib}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
export LCL_PLATFORM=gtk2
mkdir -p $out/share "$out/lazarus"
tar xf ${fpc.src} --strip-components=1 -C $out/share -m

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
patchPhase = ''
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}/lib/|g' -i src/libponyc/codegen/genexe.c
'';
preBuild = ''

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
preCheck =
# Make `libgcc_s.so' visible for `pthread_cancel'.
'' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.cc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH"
'' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.cc.lib}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH"
'';
meta = {

View File

@ -5,7 +5,7 @@ let
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc}/lib64";
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc.lib}/lib64";
patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
src =

View File

@ -5,7 +5,7 @@ let
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc}/lib64";
[ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc.lib}/lib64";
patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
in
stdenv.mkDerivation rec {

View File

@ -122,8 +122,8 @@ stdenv.mkDerivation rec {
install -vD out/Release/mksnapshot "$out/bin/mksnapshot"
${if stdenv.isDarwin then ''
install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib"
install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/bin/d8
install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/lib/libgcc_s.1.dylib $out/bin/d8
install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
'' else ''
install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"
''}

View File

@ -67,8 +67,8 @@ stdenv.mkDerivation rec {
'';
postFixup = if stdenv.isDarwin then ''
install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/bin/d8
install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/lib/libgcc_s.1.dylib $out/bin/d8
install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc.lib}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
'' else null;
meta = with stdenv.lib; {

View File

@ -87,7 +87,7 @@ in stdenv.mkDerivation rec {
# Create wrappers
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib $out/bin/clinfo
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib $out/bin/clinfo
# Fix modes
find "$out/" -type f -exec chmod 644 {} \;

View File

@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
for i in emulator64-arm emulator64-mips emulator64-x86
do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
patchelf --set-rpath ${stdenv.cc.cc}/lib64 $i
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64 $i
done
''}

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation {
./install.sh "--prefix=$out"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib.out}/lib" \
--set-rpath "${stdenv.cc.cc.lib}/lib/:${stdenv.cc.cc.lib}/lib64/:${zlib.out}/lib" \
"$out/bin/cargo"
'' else "") + postInstall;
}

View File

@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
# Patch it
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic"
patchelf --set-rpath "${stdenv.cc.cc}/lib:${stdenv.cc.cc}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic"
# Build the LD_PRELOAD library that makes Logic work from a read-only directory
mkdir -p "$out/lib"

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/{opt/andyetitmoves,bin}
cp -r * $out/opt/andyetitmoves/
fullPath=${stdenv.cc.cc}/lib64
fullPath=${stdenv.cc.cc.lib}/lib64
for i in $nativeBuildInputs; do
fullPath=$fullPath''${fullPath:+:}$i/lib
done

View File

@ -27,25 +27,25 @@ stdenv.mkDerivation {
do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f
done
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
launcher_$arch
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib\
libNetwork_$arch.so
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib\
libQtCoreUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
libQtGuiUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib\
libQtNetworkUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\
libQtWebKitUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib\
libQtXmlUnigine_$arch.so.4
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib\
libRakNet_$arch.so
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
libUnigine_$arch.so
patchelf --set-rpath ${stdenv.cc.cc}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXinerama libXrandr ]}\
OilRush_$arch
'';
installPhase = ''

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
postInstall = ''
wrapProgram "$out/bin/spring" \
--prefix LD_LIBRARY_PATH : "${stdenv.cc.cc}/lib::${systemd}/lib"
--prefix LD_LIBRARY_PATH : "${stdenv.cc.cc.lib}/lib::${systemd}/lib"
'';
meta = with stdenv.lib; {

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
cp -r * $out/res
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \
--set-rpath ${stdenv.cc.cc}/lib:${libX11}/lib:${mesa}/lib \
--set-rpath ${stdenv.cc.cc.lib}/lib:${libX11}/lib:${mesa}/lib \
"$out/res/Tibia"
# We've patchelf'd the files. The main Tibia binary is a bit

View File

@ -40,28 +40,28 @@ stdenv.mkDerivation rec {
popd
substituteInPlace $out/tools/cli/main.js \
--replace "@INTERPRETER@" "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--replace "@RPATH@" "${stdenv.cc.cc}/lib:${zlib.out}/lib" \
--replace "@RPATH@" "${stdenv.cc.cc.lib}/lib:${zlib.out}/lib" \
--replace "@PATCHELF@" "${patchelf}/bin/patchelf"
# Patch node.
node=$devBundle/bin/node
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$(patchelf --print-rpath $node):${stdenv.cc.cc}/lib" \
--set-rpath "$(patchelf --print-rpath $node):${stdenv.cc.cc.lib}/lib" \
$node
# Patch mongo.
for p in $devBundle/mongodb/bin/mongo{,d}; do
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$(patchelf --print-rpath $p):${stdenv.cc.cc}/lib:${zlib.out}/lib" \
--set-rpath "$(patchelf --print-rpath $p):${stdenv.cc.cc.lib}/lib:${zlib.out}/lib" \
$p
done
# Patch node dlls.
for p in $(find $out/packages -name '*.node'); do
patchelf \
--set-rpath "$(patchelf --print-rpath $p):${stdenv.cc.cc}/lib" \
--set-rpath "$(patchelf --print-rpath $p):${stdenv.cc.cc.lib}/lib" \
$p
done

View File

@ -5,12 +5,12 @@ assert stdenv.isLinux;
let
p = if stdenv.is64bit then {
arch = "x86_64";
gcclib = "${stdenv.cc.cc}/lib64";
gcclib = "${stdenv.cc.cc.lib}/lib64";
sha256 = "0k05ybvnv0zx4vfx55jyhia38qqysaj68mapq0gwgf74k3a943g2";
}
else {
arch = "i386";
gcclib = "${stdenv.cc.cc}/lib";
gcclib = "${stdenv.cc.cc.lib}/lib";
sha256 = "09z9idmp7idcq0alwkla9kal9h82dx11jqh678lc4rviqggxzxhp";
};
in

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
cd $out
unzip ${src}
rpmextract linux/MegaCli-8.07.07-1.noarch.rpm
${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib opt/MegaRAID/MegaCli/MegaCli64
${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib opt/MegaRAID/MegaCli/MegaCli64
wrapProgram $out/opt/MegaRAID/MegaCli/MegaCli64 --set LD_LIBRARY_PATH $out/opt/lsi/3rdpartylibs/x86_64
ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64
eval fixupPhase

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/lib
ln -s ${stdenv.cc.cc}/lib/libstdc++.so.6 $out/lib/
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
ln -s ${libudev.out}/lib/libudev.so.1 $out/lib/libudev.so.0
wrapProgram $out/bin/StarUML \

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
buildInputs = [ readline tcp_wrappers pcre makeWrapper gcc ];
patches = [ debianPatch ];
postInstall = ''
wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib${if stdenv.system == "x86_64-linux" then "64" else ""}
wrapProgram $out/sbin/atftpd --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc.lib}/lib${if stdenv.system == "x86_64-linux" then "64" else ""}
'';
meta = {
description = "Advanced tftp tools";