Unverified Commit 5503bc3f authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

ruby-modules/gem-config: patch mathematical gem for Darwin (#384539)

parents bb3577f6 40e73717
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -552,6 +552,10 @@ in
      rpath="$(patchelf --print-rpath "$soPath")"
      patchelf --set-rpath "${lib.makeLibraryPath [ lasem glib cairo ]}:$rpath" "$soPath"
      patchelf --replace-needed liblasem.so liblasem-0.4.so "$soPath"
    ''  + lib.optionalString stdenv.hostPlatform.isDarwin ''
      soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.bundle"
      install_name_tool -add_rpath "${lib.makeLibraryPath [ lasem glib cairo ]}/lib" "$soPath"
      install_name_tool -change @rpath/liblasem.dylib "${lib.getLib lasem}/lib/liblasem-0.4.dylib" "$soPath"
    '';
  };