asciidoctor: Use an explicit path to patchelf

Hopefully fixing the Darwin build
This commit is contained in:
Joe Hermaszewski 2018-04-10 11:34:24 +08:00
parent 16bc4ffc85
commit cb3f5a2d9c

View File

@ -1,7 +1,7 @@
{ stdenv, lib, bundlerApp, ruby, curl
# Dependencies of the 'mathematical' package
, cmake, bison, flex, glib, pkgconfig, cairo
, pango, gdk_pixbuf, libxml2, python3
, pango, gdk_pixbuf, libxml2, python3, patchelf
}:
bundlerApp {
@ -39,8 +39,8 @@ bundlerApp {
# For some reason 'mathematical.so' is missing cairo and glib in its RPATH, add them explicitly here
postFixup = ''
soPath="$out/lib/ruby/gems/2.4.0/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so"
patchelf \
--set-rpath "${lib.makeLibraryPath [ glib cairo ]}:$(patchelf --print-rpath "$soPath")" \
${patchelf}/bin/patchelf \
--set-rpath "${lib.makeLibraryPath [ glib cairo ]}:$(${patchelf}/bin/patchelf --print-rpath "$soPath")" \
"$soPath"
'';
};