2015-09-10 17:48:15 +01:00
|
|
|
{ stdenv, lib, fetchurl, makeDesktopItem, unzip, ant, jdk
|
|
|
|
# Optional, Jitsi still runs without, but you may pass null:
|
2015-09-23 12:36:23 +01:00
|
|
|
, alsaLib, dbus_libs, gtk2, libpulseaudio, openssl, xorg
|
2015-09-10 17:48:15 +01:00
|
|
|
}:
|
2014-03-04 12:17:57 +00:00
|
|
|
|
2015-09-17 21:04:06 +01:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-03-04 12:17:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
name = "jitsi-${version}";
|
2015-06-02 22:30:30 +01:00
|
|
|
version = "2.8.5426";
|
2014-03-04 12:17:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.jitsi.org/jitsi/src/jitsi-src-${version}.zip";
|
2015-06-02 22:30:30 +01:00
|
|
|
sha256 = "0v7k16in2i57z5amr7k5c3fc8f0azrzrs5dvn729bwbc31z8cjg6";
|
2014-03-04 12:17:57 +00:00
|
|
|
};
|
|
|
|
|
2015-06-02 22:30:30 +01:00
|
|
|
|
2014-03-04 12:17:57 +00:00
|
|
|
patches = [ ./jitsi.patch ];
|
|
|
|
|
|
|
|
jitsiItem = makeDesktopItem {
|
|
|
|
name = "Jitsi";
|
|
|
|
exec = "jitsi";
|
|
|
|
comment = "VoIP and Instant Messaging client";
|
|
|
|
desktopName = "Jitsi";
|
|
|
|
genericName = "Instant Messaging";
|
|
|
|
categories = "Application;Internet;";
|
|
|
|
};
|
|
|
|
|
2015-09-10 17:48:15 +01:00
|
|
|
libPath = lib.makeLibraryPath ([
|
|
|
|
stdenv.cc.cc # For libstdc++.
|
|
|
|
] ++ lib.filter (x: x != null) [
|
|
|
|
alsaLib
|
|
|
|
dbus_libs
|
|
|
|
gtk2
|
|
|
|
libpulseaudio
|
|
|
|
openssl
|
2015-09-23 12:36:23 +01:00
|
|
|
] ++ lib.optionals (xorg != null) [
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libXv
|
2015-09-10 17:48:15 +01:00
|
|
|
]);
|
|
|
|
|
2014-03-04 12:17:57 +00:00
|
|
|
buildInputs = [unzip ant jdk];
|
|
|
|
|
|
|
|
buildPhase = ''ant make'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -a lib $out/
|
2015-09-18 19:10:00 +01:00
|
|
|
rm -rf $out/lib/native/solaris
|
2014-03-04 12:17:57 +00:00
|
|
|
cp -a sc-bundles $out/
|
|
|
|
mkdir $out/bin
|
|
|
|
cp resources/install/generic/run.sh $out/bin/jitsi
|
|
|
|
chmod +x $out/bin/jitsi
|
2015-09-18 08:27:29 +01:00
|
|
|
substituteInPlace $out/bin/jitsi \
|
|
|
|
--subst-var-by JAVA ${jdk}/bin/java \
|
2016-08-23 02:35:42 +01:00
|
|
|
--subst-var-by EXTRALIBS ${gtk2.out}/lib
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs $out
|
2015-09-10 17:48:15 +01:00
|
|
|
|
|
|
|
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
|
2014-03-04 12:17:57 +00:00
|
|
|
'';
|
|
|
|
|
2015-09-23 12:42:14 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-03-04 12:17:57 +00:00
|
|
|
homepage = https://jitsi.org/;
|
|
|
|
description = "Open Source Video Calls and Chat";
|
2015-09-23 12:42:14 +01:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.khumba ];
|
2014-03-04 12:17:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|