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/ ln -s $path/lib/*.so* $out/lib/
done 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 mkdir $out/bin
ln -s $out/renoise $out/bin/renoise ln -s $out/renoise $out/bin/renoise

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
echo ${libPath} echo ${libPath}
patchelf \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --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 $out/sublime/sublime_text
''; '';

View File

@ -37,7 +37,7 @@ in let
for i in sublime_text plugin_host crash_reporter; do for i in sublime_text plugin_host crash_reporter; do
patchelf \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --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 $i
done done
@ -57,7 +57,7 @@ in let
--set NIX_REDIRECTS ${builtins.concatStringsSep ":" redirects} --set NIX_REDIRECTS ${builtins.concatStringsSep ":" redirects}
# Without this, plugin_host crashes, even though it has the rpath # 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 { in stdenv.mkDerivation {

View File

@ -76,11 +76,11 @@ stdenv.mkDerivation rec {
cp opt/google/talkplugin/*.so $plugins cp opt/google/talkplugin/*.so $plugins
for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do 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 done
for i in libgoogletalkremoting.so libnpo1d.so; do 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 done
mkdir -p $out/libexec/google/talkplugin mkdir -p $out/libexec/google/talkplugin
@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
patchelf \ patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --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 $out/libexec/google/talkplugin/GoogleTalkPlugin
# Generate an LD_PRELOAD wrapper to redirect execvp() calls to # Generate an LD_PRELOAD wrapper to redirect execvp() calls to

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@ let
gtk2 glib fontconfig freetype unixODBC alsaLib 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 = '' unpackPhase = ''
sh $src --keep --noexec sh $src --keep --noexec

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation {
]; ];
preBuild = '' preBuild = ''
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/" 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 export LCL_PLATFORM=gtk2
mkdir -p $out/share "$out/lazarus" mkdir -p $out/share "$out/lazarus"
tar xf ${fpc.src} --strip-components=1 -C $out/share -m tar xf ${fpc.src} --strip-components=1 -C $out/share -m

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
patchPhase = '' patchPhase = ''
sed 's|/usr/lib/x86_64-linux-gnu/|${glibc.out}/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}/lib/|g' -i src/libponyc/codegen/genexe.c
''; '';
preBuild = '' preBuild = ''

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
preCheck = preCheck =
# Make `libgcc_s.so' visible for `pthread_cancel'. # 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 = { meta = {

View File

@ -5,7 +5,7 @@ let
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
libPath = stdenv.lib.makeLibraryPath 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}"; patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
src = src =

View File

@ -5,7 +5,7 @@ let
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
libPath = stdenv.lib.makeLibraryPath 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}"; patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View File

@ -122,8 +122,8 @@ stdenv.mkDerivation rec {
install -vD out/Release/mksnapshot "$out/bin/mksnapshot" install -vD out/Release/mksnapshot "$out/bin/mksnapshot"
${if stdenv.isDarwin then '' ${if stdenv.isDarwin then ''
install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib" 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 -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/libgcc_s.1.dylib $out/lib/libv8.dylib 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 '' '' else ''
install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so" 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 '' 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 -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/libgcc_s.1.dylib $out/lib/libv8.dylib 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; '' else null;
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -87,7 +87,7 @@ in stdenv.mkDerivation rec {
# Create wrappers # Create wrappers
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo 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 # Fix modes
find "$out/" -type f -exec chmod 644 {} \; 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 for i in emulator64-arm emulator64-mips emulator64-x86
do do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i 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 done
''} ''}

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation {
./install.sh "--prefix=$out" ./install.sh "--prefix=$out"
'' + (if stdenv.isLinux then '' '' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc.out}/lib/${stdenv.cc.dynamicLinker}" \ 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" "$out/bin/cargo"
'' else "") + postInstall; '' else "") + postInstall;
} }

View File

@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
# Patch it # Patch it
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic" 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 # Build the LD_PRELOAD library that makes Logic work from a read-only directory
mkdir -p "$out/lib" mkdir -p "$out/lib"

View File

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

View File

@ -27,25 +27,25 @@ stdenv.mkDerivation {
do do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f
done 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 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 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 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 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 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 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 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 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 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 OilRush_$arch
''; '';
installPhase = '' installPhase = ''

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
wrapProgram "$out/bin/spring" \ 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; { meta = with stdenv.lib; {

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
cp -r * $out/res cp -r * $out/res
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \ 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" "$out/res/Tibia"
# We've patchelf'd the files. The main Tibia binary is a bit # We've patchelf'd the files. The main Tibia binary is a bit

View File

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

View File

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

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
cd $out cd $out
unzip ${src} unzip ${src}
rpmextract linux/MegaCli-8.07.07-1.noarch.rpm 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 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 ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64
eval fixupPhase eval fixupPhase

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/lib 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 ln -s ${libudev.out}/lib/libudev.so.1 $out/lib/libudev.so.0
wrapProgram $out/bin/StarUML \ wrapProgram $out/bin/StarUML \

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation {
buildInputs = [ readline tcp_wrappers pcre makeWrapper gcc ]; buildInputs = [ readline tcp_wrappers pcre makeWrapper gcc ];
patches = [ debianPatch ]; patches = [ debianPatch ];
postInstall = '' 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 = { meta = {
description = "Advanced tftp tools"; description = "Advanced tftp tools";