From b81f7f91fa6b628c10391c97a7a67b708fa1034d Mon Sep 17 00:00:00 2001 From: James Kay Date: Thu, 14 May 2020 18:52:05 +0100 Subject: gem-config.mathematical: add lasem to rpath Co-authored-by: Dylan Baker --- pkgs/development/ruby-modules/gem-config/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pkgs/development/ruby-modules') diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 791ae3d0d31..2a5d7bb666e 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -18,7 +18,7 @@ # (to make gems behave if necessary). { lib, fetchurl, writeScript, ruby, kerberos, libxml2, libxslt, python, stdenv, which -, libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick +, libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick, lasem , pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi , cmake, libssh2, openssl, libmysqlclient, darwin, git, perl, pcre, gecode_3, curl , msgpack, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem @@ -332,6 +332,7 @@ in flex pkg-config python3 + patchelf ]; buildInputs = [ @@ -356,12 +357,13 @@ in $out/${ruby.gemPath}/extensions/*/*/mathematical-${attrs.version}/gem_make.out ''; - # For some reason 'mathematical.so' is missing cairo and glib in its RPATH, add them explicitly here + # For some reason 'mathematical.so' is missing cairo, glib, and + # lasem in its RPATH, add them explicitly here postFixup = lib.optionalString stdenv.isLinux '' soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so" - ${patchelf}/bin/patchelf \ - --set-rpath "${lib.makeLibraryPath [ glib cairo ]}:$(${patchelf}/bin/patchelf --print-rpath "$soPath")" \ - "$soPath" + 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" ''; }; -- cgit 1.4.1