From 3d8cd48c58903110e85f3ee41bf7bc961fc1b676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 26 Jun 2013 23:46:47 +0200 Subject: [PATCH 1/5] Making ccrtp propagate its build time requirement, ucommon. --- pkgs/development/libraries/ccrtp/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ccrtp/default.nix b/pkgs/development/libraries/ccrtp/default.nix index a6e426b164a..c5ae776fe3e 100644 --- a/pkgs/development/libraries/ccrtp/default.nix +++ b/pkgs/development/libraries/ccrtp/default.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation { sha256 = "1p4zzqn02zvnyjy84khiq8v65pl422fb6ni946h9sxh4yw2lgn01"; }; - buildInputs = [ openssl pkgconfig libgcrypt ucommon ]; + buildInputs = [ openssl pkgconfig libgcrypt ]; + propagatedBuildInputs = [ ucommon ]; doCheck = true; From c77f6a0c2fb99235d8eca2b8b09c54b655999d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 26 Jun 2013 23:47:09 +0200 Subject: [PATCH 2/5] As libccrtp propagates ucommon, it's not needed in libzrtpcpp. --- pkgs/development/libraries/libzrtpcpp/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libzrtpcpp/default.nix b/pkgs/development/libraries/libzrtpcpp/default.nix index 9e569eea580..02741bc6fa1 100644 --- a/pkgs/development/libraries/libzrtpcpp/default.nix +++ b/pkgs/development/libraries/libzrtpcpp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, ucommon, openssl, pkgconfig, ccrtp }: +{ stdenv, fetchurl, cmake, openssl, pkgconfig, ccrtp }: stdenv.mkDerivation rec { name = "libzrtpcpp-2.0.0"; @@ -8,7 +8,12 @@ stdenv.mkDerivation rec { sha256 = "05yw8n5xpj0jxkvzgsvn3xkxirpypc1japy9k1jqs9301fgb1a3i"; }; - buildInputs = [ cmake ucommon openssl pkgconfig ccrtp ]; + # We disallow 'lib64', or pkgconfig will not find it. + prePatch = '' + sed -i s/lib64/lib/ CMakeLists.txt + ''; + + buildInputs = [ cmake openssl pkgconfig ccrtp ]; meta = { description = "GNU RTP stack for the zrtp protocol developed by Phil Zimmermann"; From d3e7649eeec968b7979ea4c1f6f16c8d7d292155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 26 Jun 2013 23:47:34 +0200 Subject: [PATCH 3/5] Update ucommon to 6.0.5. The hope that newer means better. --- pkgs/development/libraries/ucommon/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/ucommon/default.nix b/pkgs/development/libraries/ucommon/default.nix index cfcb47dd54f..ca0427481da 100644 --- a/pkgs/development/libraries/ucommon/default.nix +++ b/pkgs/development/libraries/ucommon/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, gnutls, pkgconfig, zlib, libgcrypt }: stdenv.mkDerivation rec { - name = "ucommon-5.2.2"; + name = "ucommon-6.0.5"; src = fetchurl { - url = mirror://gnu/commoncpp/ucommon-5.2.2.tar.gz; - sha256 = "1s9r7yhvqnj57aiw7sklp2p6llfzn1jxvc3hwhpli5zq3r6kypwx"; + url = mirror://gnu/commoncpp/ucommon-6.0.5.tar.gz; + sha256 = "0w5nl2a2l630n4kvfaz22by1s92ybd87g0q1zpcmsl8i5d00789l"; }; buildInputs = [ pkgconfig gnutls zlib ]; From 53f38dcbd041b95c09dabae536fb3ff73d3bb61d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 26 Jun 2013 23:48:55 +0200 Subject: [PATCH 4/5] Adding partially sflphone (only daemon, maybe failing to build) --- .../instant-messengers/sflphone/default.nix | 32 +++++++++++++++++++ .../sflphone/libzrtpcpp-cflags.patch | 15 +++++++++ pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/networking/instant-messengers/sflphone/default.nix create mode 100644 pkgs/applications/networking/instant-messengers/sflphone/libzrtpcpp-cflags.patch diff --git a/pkgs/applications/networking/instant-messengers/sflphone/default.nix b/pkgs/applications/networking/instant-messengers/sflphone/default.nix new file mode 100644 index 00000000000..4dbfa3da979 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/sflphone/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, libyaml, alsaLib, openssl, libuuid, pkgconfig, pulseaudio, libsamplerate, +commoncpp2, ccrtp, libzrtpcpp, dbus, dbus_cplusplus, expat, pcre, gsm, speex, ilbc, libopus, +autoconf, automake, libtool, gettext, perl }: + +stdenv.mkDerivation rec { + name = "sflphone-1.2.3"; + + src = fetchurl { + url = "https://projects.savoirfairelinux.com/attachments/download/6423/${name}.tar.gz"; + sha256 = "0aiwlky7mp5l51a7kkhkmaz7ivapypar291kdxzdxl1s3qy0x6fd"; + }; + + patches = [ ./libzrtpcpp-cflags.patch ]; + + preConfigure = '' + cd daemon + + # Post patch, required + autoreconf -vfi + + cd libs + bash ./compile_pjsip.sh + cd .. + ''; + + configureFlags = "--with-expat --with-expat-inc=${expat}/include " + + "--with-expat-lib=-lexpat --with-opus "; + + buildInputs = [ libyaml alsaLib openssl libuuid pkgconfig pulseaudio libsamplerate + commoncpp2 ccrtp libzrtpcpp dbus dbus_cplusplus expat pcre gsm speex ilbc libopus + autoconf automake libtool gettext perl ]; +} diff --git a/pkgs/applications/networking/instant-messengers/sflphone/libzrtpcpp-cflags.patch b/pkgs/applications/networking/instant-messengers/sflphone/libzrtpcpp-cflags.patch new file mode 100644 index 00000000000..972d9c58808 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/sflphone/libzrtpcpp-cflags.patch @@ -0,0 +1,15 @@ +diff --git a/daemon/src/audio/audiortp/Makefile.am b/daemon/src/audio/audiortp/Makefile.am +index c27eedd..fe64077 100644 +--- a/daemon/src/audio/audiortp/Makefile.am ++++ b/daemon/src/audio/audiortp/Makefile.am +@@ -4,6 +4,10 @@ noinst_LTLIBRARIES = libaudiortp.la + + if BUILD_ZRTP + SFL_ZRTP_SRC=audio_zrtp_session.h audio_zrtp_session.cpp zrtp_session_callback.cpp zrtp_session_callback.h ++libaudiortp_la_CXXFLAGS = \ ++ @CCGNU2_CFLAGS@ \ ++ @ZRTPCPP_CFLAGS@ \ ++ @CCRTP_CFLAGS@ + endif + + libaudiortp_la_SOURCES = \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6316f0a7557..7ac7ff889ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8107,6 +8107,8 @@ let seq24 = callPackage ../applications/audio/seq24 { }; + sflphone = callPackage ../applications/networking/instant-messengers/sflphone { }; + siproxd = callPackage ../applications/networking/siproxd { }; skype = callPackage_i686 ../applications/networking/instant-messengers/skype { @@ -8115,7 +8117,6 @@ let skype4pidgin = callPackage ../applications/networking/instant-messengers/pidgin-plugins/skype4pidgin { }; - skype_call_recorder = callPackage ../applications/networking/instant-messengers/skype-call-recorder { }; st = callPackage ../applications/misc/st { From 538a1d3aa14358446e66dfe41ccd82fa8f032e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 27 Jun 2013 00:09:26 +0200 Subject: [PATCH 5/5] Making sflphone build, and its gnome client too. --- .../instant-messengers/sflphone/default.nix | 83 +++++++++++++++---- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 68 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/sflphone/default.nix b/pkgs/applications/networking/instant-messengers/sflphone/default.nix index 4dbfa3da979..79b554798ee 100644 --- a/pkgs/applications/networking/instant-messengers/sflphone/default.nix +++ b/pkgs/applications/networking/instant-messengers/sflphone/default.nix @@ -1,8 +1,10 @@ -{ stdenv, fetchurl, libyaml, alsaLib, openssl, libuuid, pkgconfig, pulseaudio, libsamplerate, -commoncpp2, ccrtp, libzrtpcpp, dbus, dbus_cplusplus, expat, pcre, gsm, speex, ilbc, libopus, -autoconf, automake, libtool, gettext, perl }: +{ stdenv, fetchurl, libyaml, alsaLib, openssl, libuuid, pkgconfig, pulseaudio, libsamplerate +, commoncpp2, ccrtp, libzrtpcpp, dbus, dbus_cplusplus, expat, pcre, gsm, speex, ilbc, libopus +, autoconf, automake, libtool, gettext, perl +, cmake, qt4 +, gtk, glib, dbus_glib, libnotify, intltool }: -stdenv.mkDerivation rec { +let name = "sflphone-1.2.3"; src = fetchurl { @@ -10,23 +12,68 @@ stdenv.mkDerivation rec { sha256 = "0aiwlky7mp5l51a7kkhkmaz7ivapypar291kdxzdxl1s3qy0x6fd"; }; - patches = [ ./libzrtpcpp-cflags.patch ]; + meta = { + homepage = http://sflphone.org/; + license = "GPLv3+"; + description = "Free software enterprise-class softphone for GNU/Linux"; + platforms = with stdenv.lib.platforms; linux; + maintainers = with stdenv.lib.maintainers; [viric]; + }; - preConfigure = '' - cd daemon +in +rec { + daemon = stdenv.mkDerivation { + name = name + "-daemon"; - # Post patch, required - autoreconf -vfi + inherit src; - cd libs - bash ./compile_pjsip.sh - cd .. - ''; + patches = [ ./libzrtpcpp-cflags.patch ]; - configureFlags = "--with-expat --with-expat-inc=${expat}/include " + - "--with-expat-lib=-lexpat --with-opus "; + preConfigure = '' + cd daemon - buildInputs = [ libyaml alsaLib openssl libuuid pkgconfig pulseaudio libsamplerate - commoncpp2 ccrtp libzrtpcpp dbus dbus_cplusplus expat pcre gsm speex ilbc libopus - autoconf automake libtool gettext perl ]; + # Post patch, required + autoreconf -vfi + + cd libs + bash ./compile_pjsip.sh + cd .. + ''; + + configureFlags = "--with-expat --with-expat-inc=${expat}/include " + + "--with-expat-lib=-lexpat --with-opus "; + + buildInputs = [ libyaml alsaLib openssl libuuid pkgconfig pulseaudio libsamplerate + commoncpp2 ccrtp libzrtpcpp dbus dbus_cplusplus expat pcre gsm speex ilbc libopus + autoconf automake libtool gettext perl ]; + }; + + # 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"; + + inherit src; + + preConfigure = '' + cd kde + ''; + + buildInputs = [ daemon cmake qt4 pkgconfig ]; + }; + */ + + gnome = stdenv.mkDerivation { + name = name + "-gnome"; + + inherit src; + + preConfigure = '' + cd gnome + ''; + + buildInputs = [ daemon pkgconfig gtk glib dbus_glib libnotify intltool ]; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ac7ff889ff..45ed59df888 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8107,7 +8107,9 @@ let seq24 = callPackage ../applications/audio/seq24 { }; - sflphone = callPackage ../applications/networking/instant-messengers/sflphone { }; + sflphone = callPackage ../applications/networking/instant-messengers/sflphone { + gtk = gtk3; + }; siproxd = callPackage ../applications/networking/siproxd { };