jitsi: patch RPATHs of bundled .so files
Possibly helps with bug #3482.
This commit is contained in:
parent
4140c7fe16
commit
8ef6197be5
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue