nixpkgs/pkgs/by-name/ji/jitsi/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
2.0 KiB
Nix
Raw Permalink Normal View History

{ stdenv, lib, fetchFromGitHub, makeDesktopItem, unzip, ant, jdk8
# Optional, Jitsi still runs without, but you may pass null:
, alsa-lib, dbus, gtk2, libpulseaudio, openssl, xorg
}:
2014-03-04 12:17:57 +00:00
2020-09-19 16:42:18 +01:00
let jdk = jdk8; in
2014-03-04 12:17:57 +00:00
stdenv.mkDerivation rec {
pname = "jitsi";
version = "2.11.5633";
2014-03-04 12:17:57 +00:00
src = fetchFromGitHub {
owner = "jitsi";
repo = "jitsi";
rev = "refs/tags/${lib.versions.patch version}";
hash = "sha256-CN4o0VfHdoUteI2wyJ2hFJ9UsQ2wWUzcvrLMbR/l36M=";
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 = [ "Chat" ];
2014-03-04 12:17:57 +00:00
};
libPath = lib.makeLibraryPath ([
stdenv.cc.cc # For libstdc++.
alsa-lib
dbus
gtk2
libpulseaudio
openssl
2015-09-23 12:36:23 +01:00
xorg.libX11
xorg.libXext
xorg.libXScrnSaver
xorg.libXv
]);
nativeBuildInputs = [ unzip ];
buildInputs = [ ant jdk ];
2014-03-04 12:17:57 +00:00
buildPhase = "ant make";
2014-03-04 12:17:57 +00:00
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
substituteInPlace $out/bin/jitsi \
--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
patchShebangs $out
libPath="$libPath:${jdk.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
'';
meta = with lib; {
homepage = "https://desktop.jitsi.org/";
2014-03-04 12:17:57 +00:00
description = "Open Source Video Calls and Chat";
mainProgram = "jitsi";
sourceProvenance = with sourceTypes; [
binaryBytecode
binaryNativeCode
];
license = licenses.lgpl21Plus;
platforms = platforms.linux;
maintainers = teams.jitsi.members;
2014-03-04 12:17:57 +00:00
};
}