odpic: add to rpath

This commit is contained in:
Florian Klink 2019-08-21 02:56:18 +02:00
parent 6081611046
commit eb0fecf294

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
postFixup = ''
${stdenv.lib.optionalString (stdenv.isLinux) ''
patchelf --set-rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
''}
${stdenv.lib.optionalString (stdenv.isDarwin) ''
install_name_tool -add_rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}