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