diff options
author | Bryan Gardiner <bog@khumba.net> | 2015-09-10 09:48:15 -0700 |
---|---|---|
committer | Bryan Gardiner <bog@khumba.net> | 2015-09-16 06:42:25 -0700 |
commit | 8ef6197be5da964f35dec5a4a580fb9685ee9e2e (patch) | |
tree | c72ce4118a064e7210c4bac1b1166b17c55e58c0 /pkgs/applications/networking/instant-messengers/jitsi | |
parent | 4140c7fe16d58c79f98d8a29abda1e4cda116924 (diff) |
jitsi: patch RPATHs of bundled .so files
Possibly helps with bug #3482.
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/jitsi')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/jitsi/default.nix | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/pkgs/applications/networking/instant-messengers/jitsi/default.nix b/pkgs/applications/networking/instant-messengers/jitsi/default.nix index 195c958847809..decd7b6f3926d 100644 --- a/pkgs/applications/networking/instant-messengers/jitsi/default.nix +++ b/pkgs/applications/networking/instant-messengers/jitsi/default.nix @@ -1,4 +1,7 @@ -{ stdenv, fetchurl, makeDesktopItem, unzip, ant, jdk }: +{ stdenv, lib, fetchurl, makeDesktopItem, unzip, ant, jdk +# Optional, Jitsi still runs without, but you may pass null: +, alsaLib, dbus_libs, gtk2, libpulseaudio, openssl, xlibs +}: stdenv.mkDerivation rec { @@ -22,6 +25,21 @@ stdenv.mkDerivation rec { categories = "Application;Internet;"; }; + libPath = lib.makeLibraryPath ([ + stdenv.cc.cc # For libstdc++. + ] ++ lib.filter (x: x != null) [ + alsaLib + dbus_libs + gtk2 + libpulseaudio + openssl + ] ++ lib.optionals (xlibs != null) [ + xlibs.libX11 + xlibs.libXext + xlibs.libXScrnSaver + xlibs.libXv + ]); + buildInputs = [unzip ant jdk]; buildPhase = ''ant make''; @@ -35,6 +53,12 @@ stdenv.mkDerivation rec { chmod +x $out/bin/jitsi sed -i 's| java | ${jdk}/bin/java |' $out/bin/jitsi patchShebangs $out + + libPath="$libPath:${jdk.jre.home}/lib/${jdk.architecture}" + find $out/ -type f -name '*.so' | while read file; do + patchelf --set-rpath "$libPath" "$file" && \ + patchelf --shrink-rpath "$file" + done ''; meta = { |