2015-05-27 21:42:15 +02:00
|
|
|
{ stdenv, fetchurl, libyaml, alsaLib, openssl, libuuid, pkgconfig, libpulseaudio, libsamplerate
|
2013-06-27 00:09:26 +02:00
|
|
|
, commoncpp2, ccrtp, libzrtpcpp, dbus, dbus_cplusplus, expat, pcre, gsm, speex, ilbc, libopus
|
|
|
|
, autoconf, automake, libtool, gettext, perl
|
|
|
|
, cmake, qt4
|
2013-06-30 14:32:36 +02:00
|
|
|
, gtk, glib, dbus_glib, libnotify, intltool, makeWrapper }:
|
2013-06-26 23:48:55 +02:00
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
let
|
2013-06-26 23:48:55 +02:00
|
|
|
name = "sflphone-1.2.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://projects.savoirfairelinux.com/attachments/download/6423/${name}.tar.gz";
|
|
|
|
sha256 = "0aiwlky7mp5l51a7kkhkmaz7ivapypar291kdxzdxl1s3qy0x6fd";
|
|
|
|
};
|
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://sflphone.org/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2013-06-27 00:09:26 +02:00
|
|
|
description = "Free software enterprise-class softphone for GNU/Linux";
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
daemon = stdenv.mkDerivation {
|
|
|
|
name = name + "-daemon";
|
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
patches = [ ./libzrtpcpp-cflags.patch ];
|
2013-06-26 23:48:55 +02:00
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
preConfigure = ''
|
|
|
|
cd daemon
|
2013-06-26 23:48:55 +02:00
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
# Post patch, required
|
|
|
|
autoreconf -vfi
|
|
|
|
|
|
|
|
cd libs
|
|
|
|
bash ./compile_pjsip.sh
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
2015-10-15 13:57:38 +02:00
|
|
|
configureFlags = "--with-expat --with-expat-inc=${expat.dev}/include " +
|
2013-06-27 00:09:26 +02:00
|
|
|
"--with-expat-lib=-lexpat --with-opus ";
|
|
|
|
|
2015-05-27 21:42:15 +02:00
|
|
|
buildInputs = [ libyaml alsaLib openssl libuuid pkgconfig libpulseaudio libsamplerate
|
2013-06-27 00:09:26 +02:00
|
|
|
commoncpp2 ccrtp libzrtpcpp dbus dbus_cplusplus expat pcre gsm speex ilbc libopus
|
|
|
|
autoconf automake libtool gettext perl ];
|
|
|
|
};
|
2013-06-26 23:48:55 +02:00
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
# This fails still.
|
|
|
|
# I don't know the best way to make this a KDE program (with switchable kde
|
|
|
|
# libs, like digikam for example)
|
|
|
|
/*
|
|
|
|
kde = stdenv.mkDerivation {
|
|
|
|
name = name + "-kde";
|
2013-06-26 23:48:55 +02:00
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
inherit src;
|
2013-06-26 23:48:55 +02:00
|
|
|
|
2013-06-27 00:09:26 +02:00
|
|
|
preConfigure = ''
|
|
|
|
cd kde
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ daemon cmake qt4 pkgconfig ];
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
|
|
|
|
gnome = stdenv.mkDerivation {
|
|
|
|
name = name + "-gnome";
|
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd gnome
|
|
|
|
'';
|
|
|
|
|
2013-06-30 14:32:36 +02:00
|
|
|
# gtk3 programs have the runtime dependency on XDG_DATA_DIRS
|
2014-04-13 23:50:21 +02:00
|
|
|
preFixup = ''
|
|
|
|
for f in "$out/bin/sflphone" "$out/bin/sflphone-client-gnome"; do
|
|
|
|
wrapProgram $f --prefix XDG_DATA_DIRS ":" "${gtk}/share:$GSETTINGS_SCHEMAS_PATH"
|
|
|
|
done
|
2013-06-30 14:32:36 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ daemon pkgconfig gtk glib dbus_glib libnotify intltool makeWrapper ];
|
2013-06-27 00:09:26 +02:00
|
|
|
};
|
2013-06-26 23:48:55 +02:00
|
|
|
}
|