2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, intltool, pkgconfig, readline, openldap, cyrus_sasl, libupnp
|
2016-09-05 23:53:33 +01:00
|
|
|
, zlib, libxml2, gtk2, libnotify, speex, ffmpeg, libX11, libsoup, udev
|
2018-02-10 05:23:26 +00:00
|
|
|
, ortp, mediastreamer, sqlite, belle-sip, libosip, libexosip, bzrtp
|
2016-09-06 17:17:14 +01:00
|
|
|
, mediastreamer-openh264, bctoolbox, makeWrapper, fetchFromGitHub, cmake
|
2019-11-23 18:16:51 +00:00
|
|
|
, libmatroska, bcunit, doxygen, gdk-pixbuf, glib, cairo, pango, mbedtls
|
|
|
|
, python, graphviz, belcard, bcg729
|
2018-09-11 16:29:13 +01:00
|
|
|
, withGui ? true
|
2015-04-07 02:15:57 +01:00
|
|
|
}:
|
2013-02-16 20:48:47 +00:00
|
|
|
|
2011-08-18 13:52:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-11-23 18:16:51 +00:00
|
|
|
pname = "linphone";
|
2018-02-10 05:23:26 +00:00
|
|
|
version = "3.12.0";
|
2011-01-13 20:49:58 +00:00
|
|
|
|
2016-09-06 17:17:14 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BelledonneCommunications";
|
2019-11-23 18:16:51 +00:00
|
|
|
repo = pname;
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2018-02-10 05:23:26 +00:00
|
|
|
sha256 = "0az2ywrpx11sqfb4s4r2v726avcjf4k15bvrqj7xvhz7hdndmh0j";
|
2011-01-13 20:49:58 +00:00
|
|
|
};
|
|
|
|
|
2018-09-11 16:29:13 +01:00
|
|
|
cmakeFlags = stdenv.lib.optional withGui [ "-DENABLE_GTK_UI=ON" ];
|
2018-09-11 13:54:57 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
touch coreapi/liblinphone_gitversion.h
|
|
|
|
'';
|
|
|
|
|
2015-04-07 02:15:57 +01:00
|
|
|
buildInputs = [
|
|
|
|
readline openldap cyrus_sasl libupnp zlib libxml2 gtk2 libnotify speex ffmpeg libX11
|
2019-11-23 18:16:51 +00:00
|
|
|
mbedtls libsoup udev ortp mediastreamer sqlite belle-sip libosip libexosip
|
|
|
|
bctoolbox libmatroska gdk-pixbuf glib cairo pango bzrtp belcard bcg729
|
2015-04-07 02:15:57 +01:00
|
|
|
];
|
2011-01-13 20:49:58 +00:00
|
|
|
|
2018-02-10 05:23:26 +00:00
|
|
|
nativeBuildInputs = [
|
2019-11-23 18:16:51 +00:00
|
|
|
intltool pkgconfig makeWrapper cmake bcunit doxygen graphviz
|
2018-02-10 05:23:26 +00:00
|
|
|
(python.withPackages (ps: [ ps.pystache ps.six ]))
|
|
|
|
];
|
2012-02-17 13:03:33 +00:00
|
|
|
|
2019-11-23 18:16:51 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
|
|
"-Wno-error"
|
|
|
|
"-I${glib.dev}/include/glib-2.0"
|
|
|
|
"-I${glib.out}/lib/glib-2.0/include"
|
|
|
|
"-I${gtk2.dev}/include/gtk-2.0/"
|
|
|
|
"-I${cairo.dev}/include/cairo"
|
|
|
|
"-I${pango.dev}/include/pango-1.0"
|
|
|
|
"-I${gtk2}/lib/gtk-2.0/include"
|
|
|
|
"-DLIBLINPHONE_GIT_VERSION=\"v${version}\""
|
|
|
|
];
|
2013-02-16 20:48:47 +00:00
|
|
|
|
2015-08-26 21:17:41 +01:00
|
|
|
postInstall = ''
|
|
|
|
for i in $(cd $out/bin && ls); do
|
|
|
|
wrapProgram $out/bin/$i --set MEDIASTREAMER_PLUGINS_DIR ${mediastreamer-openh264}/lib/mediastreamer/plugins
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2015-04-07 02:15:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-11-23 18:16:51 +00:00
|
|
|
homepage = https://www.linphone.org/;
|
|
|
|
description = "Open source SIP phone for voice/video calls and instant messaging";
|
2015-04-07 02:15:57 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2011-01-13 20:49:58 +00:00
|
|
|
};
|
|
|
|
}
|