2020-09-19 15:42:18 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeDesktopItem, unzip, ant, jdk8
|
2015-09-10 16:48:15 +00:00
|
|
|
# Optional, Jitsi still runs without, but you may pass null:
|
2018-07-17 20:11:16 +00:00
|
|
|
, alsaLib, dbus, gtk2, libpulseaudio, openssl, xorg
|
2015-09-10 16:48:15 +00:00
|
|
|
}:
|
2014-03-04 12:17:57 +00:00
|
|
|
|
2020-09-19 15:42:18 +00:00
|
|
|
let jdk = jdk8; in
|
2014-03-04 12:17:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "jitsi";
|
2017-03-04 13:47:07 +00:00
|
|
|
version = "2.10.5550";
|
2014-03-04 12:17:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.jitsi.org/jitsi/src/jitsi-src-${version}.zip";
|
2017-03-04 13:47:07 +00:00
|
|
|
sha256 = "11vjchc3dnzj55x7c62wsm6masvwmij1ifkds917r1qvil1nzz6d";
|
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";
|
2020-08-08 13:26:02 +00:00
|
|
|
categories = "Chat";
|
2014-03-04 12:17:57 +00:00
|
|
|
};
|
|
|
|
|
2015-09-10 16:48:15 +00:00
|
|
|
libPath = lib.makeLibraryPath ([
|
|
|
|
stdenv.cc.cc # For libstdc++.
|
|
|
|
alsaLib
|
2018-07-17 20:11:16 +00:00
|
|
|
dbus
|
2015-09-10 16:48:15 +00:00
|
|
|
gtk2
|
|
|
|
libpulseaudio
|
|
|
|
openssl
|
2015-09-23 11:36:23 +00:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
xorg.libXv
|
2015-09-10 16:48:15 +00:00
|
|
|
]);
|
|
|
|
|
2017-04-02 15:28:00 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
buildInputs = [ ant jdk ];
|
2014-03-04 12:17:57 +00:00
|
|
|
|
2021-01-24 09:19:10 +00:00
|
|
|
buildPhase = "ant make";
|
2014-03-04 12:17:57 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -a lib $out/
|
2015-09-18 18:10:00 +00: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 07:27:29 +00:00
|
|
|
substituteInPlace $out/bin/jitsi \
|
2017-04-02 15:28:00 +00:00
|
|
|
--subst-var-by JAVA ${jdk}/bin/java \
|
|
|
|
--subst-var-by EXTRALIBS ${gtk2.out}/lib
|
|
|
|
sed -e 's,^java\ ,${jdk}/bin/java ,' -i $out/bin/jitsi
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs $out
|
2017-04-02 15:28:00 +00:00
|
|
|
libPath="$libPath:${jdk.home}/lib/${jdk.architecture}"
|
2015-09-10 16:48:15 +00:00
|
|
|
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
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://jitsi.org/";
|
2014-03-04 12:17:57 +00:00
|
|
|
description = "Open Source Video Calls and Chat";
|
2015-09-23 11:42:14 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
platforms = platforms.linux;
|
2020-08-04 19:46:14 +00:00
|
|
|
maintainers = teams.jitsi.members;
|
2014-03-04 12:17:57 +00:00
|
|
|
};
|
|
|
|
}
|