ring-daemon: init at 2017-07-11

This commit is contained in:
Taeer Bar-Yam 2017-07-11 16:26:42 -04:00
parent 451b23beb2
commit 484df87ab1
4 changed files with 298 additions and 0 deletions

View File

@ -0,0 +1,149 @@
{ stdenv
, fetchgit
, which
, autoreconfHook
, pkgconfig
, automake
, libtool
, pjsip
, libyamlcpp
, alsaLib
, libpulseaudio
, libsamplerate
, libsndfile
, dbus
, dbus_cplusplus
, ffmpeg
, udev
, pcre
, gsm
, speex
, boost
, opendht
, libmsgpack
, gnutls
, zlib
, jsoncpp
, xlibs
, libargon2
, cryptopp
, openssl
, perl
, python3
, bash
, libupnp
, speexdsp
, fetchFromGitHub
, cmake
, asio
}:
let
myPython = python3.withPackages (ps: with ps; [
pygobject3
dbus-python
]);
src = fetchgit {
url = https://gitlab.savoirfairelinux.com/ring/ring-daemon.git;
rev = "006b8dc7be08fe9beb68709af71004e7bc1ceb5c";
sha256 = "0ih9g0rismrhx6nqcy3jqfbcs166grg0shnfmrnmykl9h0xy8z47";
};
patchdir = "${src}/contrib/src";
restbed = import ./restbed.nix {
inherit stdenv fetchFromGitHub cmake asio openssl;
patches = [
"${patchdir}/restbed/CMakeLists.patch"
"${patchdir}/restbed/strand.patch"
"${patchdir}/restbed/uri_cpp.patch"
"${patchdir}/restbed/dns-resolution-error.patch"
"${patchdir}/restbed/string.patch"
];
};
pjsip' = stdenv.lib.overrideDerivation pjsip (old: {
patches = [
"${patchdir}/pjproject/gnutls.patch"
./notestsapps.patch # this one had to be modified
"${patchdir}/pjproject/fix_base64.patch"
"${patchdir}/pjproject/ipv6.patch"
"${patchdir}/pjproject/ice_config.patch"
"${patchdir}/pjproject/multiple_listeners.patch"
"${patchdir}/pjproject/pj_ice_sess.patch"
"${patchdir}/pjproject/fix_turn_fallback.patch"
"${patchdir}/pjproject/fix_ioqueue_ipv6_sendto.patch"
"${patchdir}/pjproject/add_dtls_transport.patch"
];
CFLAGS = "-g -DPJ_ICE_MAX_CAND=256 -DPJ_ICE_MAX_CHECKS=150 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000";
});
in
stdenv.mkDerivation rec {
name = "ring-daemon-${version}";
version = "2017-07-11";
inherit src;
nativeBuildInputs = [
which
autoreconfHook
automake
libtool
pkgconfig
];
buildInputs = [
pjsip'
libyamlcpp
alsaLib
libpulseaudio
libsamplerate
libsndfile
dbus
dbus_cplusplus
ffmpeg
udev
pcre
gsm
speex
boost
opendht
libmsgpack
gnutls
zlib
jsoncpp
restbed
xlibs.libX11
libargon2
cryptopp
openssl
perl
libupnp
speexdsp
];
postInstall = ''
mkdir $out/bin
ln -s $out/lib/ring/dring $out/bin/dring
cp -R ./tools/dringctrl/ $out/
substitute ./tools/dringctrl/dringctrl.py $out/dringctrl/dringctrl.py \
--replace '#!/usr/bin/env python3' "#!${myPython}/bin/python3"
chmod +x $out/dringctrl/dringctrl.py
ln -s $out/dringctrl/dringctrl.py $out/bin/dringctrl.py
'';
meta = with stdenv.lib; {
description = "A Voice-over-IP software phone";
longDescription = ''
As the SIP/audio daemon and the user interface are separate processes, it
is easy to provide different user interfaces. GNU Ring comes with various
graphical user interfaces and even scripts to control the daemon from the
shell.
'';
homepage = https://ring.cx;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ taeer olynch ];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,106 @@
/* diff --git a/Makefile b/Makefile */
/* index 33a4e6b..a486eb7 100644 */
/* --- a/Makefile */
/* +++ b/Makefile */
/* @@ -4,7 +4,7 @@ include build/host-$(HOST_NAME).mak */
/* include version.mak */
/* LIB_DIRS = pjlib/build pjlib-util/build pjnath/build third_party/build pjmedia/build pjsip/build */
/* -DIRS = $(LIB_DIRS) pjsip-apps/build $(EXTRA_DIRS) */
/* +DIRS = $(LIB_DIRS) $(EXTRA_DIRS) */
/* ifdef MINSIZE */
/* MAKE_FLAGS := MINSIZE=1 */
diff --git a/pjlib-util/build/Makefile b/pjlib-util/build/Makefile
index cb601cb..862a78a 100644
--- a/pjlib-util/build/Makefile
+++ b/pjlib-util/build/Makefile
@@ -54,7 +54,6 @@ export UTIL_TEST_OBJS += xml.o encryption.o stun.o resolver_test.o test.o \
export UTIL_TEST_CFLAGS += $(_CFLAGS)
export UTIL_TEST_CXXFLAGS += $(_CXXFLAGS)
export UTIL_TEST_LDFLAGS += $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
-export UTIL_TEST_EXE:=pjlib-util-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
diff --git a/pjlib/build/Makefile b/pjlib/build/Makefile
index 1e64950..a75fa65 100644
--- a/pjlib/build/Makefile
+++ b/pjlib/build/Makefile
@@ -56,7 +56,6 @@ export TEST_OBJS += activesock.o atomic.o echo_clt.o errno.o exception.o \
export TEST_CFLAGS += $(_CFLAGS)
export TEST_CXXFLAGS += $(_CXXFLAGS)
export TEST_LDFLAGS += $(PJLIB_LDLIB) $(_LDFLAGS)
-export TEST_EXE := pjlib-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile
index 8012cb7..2ca283a 100644
--- a/pjmedia/build/Makefile
+++ b/pjmedia/build/Makefile
@@ -165,7 +165,6 @@ export PJMEDIA_TEST_LDFLAGS += $(PJMEDIA_CODEC_LDLIB) \
$(PJLIB_UTIL_LDLIB) \
$(PJNATH_LDLIB) \
$(_LDFLAGS)
-export PJMEDIA_TEST_EXE:=pjmedia-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
diff --git a/pjnath/build/Makefile b/pjnath/build/Makefile
index 1bc08b5..109f79b 100644
--- a/pjnath/build/Makefile
+++ b/pjnath/build/Makefile
@@ -54,7 +54,6 @@ export PJNATH_TEST_OBJS += ice_test.o stun.o sess_auth.o server.o concur_test.o
export PJNATH_TEST_CFLAGS += $(_CFLAGS)
export PJNATH_TEST_CXXFLAGS += $(_CXXFLAGS)
export PJNATH_TEST_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
-export PJNATH_TEST_EXE:=pjnath-test-$(TARGET_NAME)$(HOST_EXE)
###############################################################################
@@ -65,7 +64,6 @@ export PJTURN_CLIENT_OBJS += client_main.o
export PJTURN_CLIENT_CFLAGS += $(_CFLAGS)
export PJTURN_CLIENT_CXXFLAGS += $(_CXXFLAGS)
export PJTURN_CLIENT_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
-export PJTURN_CLIENT_EXE:=pjturn-client-$(TARGET_NAME)$(HOST_EXE)
###############################################################################
# Defines for building TURN server application
@@ -76,7 +74,6 @@ export PJTURN_SRV_OBJS += allocation.o auth.o listener_udp.o \
export PJTURN_SRV_CFLAGS += $(_CFLAGS)
export PJTURN_SRV_CXXFLAGS += $(_CXXFLAGS)
export PJTURN_SRV_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
-export PJTURN_SRV_EXE:=pjturn-srv-$(TARGET_NAME)$(HOST_EXE)
diff --git a/pjsip/build/Makefile b/pjsip/build/Makefile
index d2a5c2a..7e2ec60 100644
--- a/pjsip/build/Makefile
+++ b/pjsip/build/Makefile
@@ -140,7 +140,7 @@ export PJSUA2_LIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
account.o endpoint.o json.o persistent.o types.o \
siptypes.o call.o presence.o media.o
export PJSUA2_LIB_CFLAGS += $(_CFLAGS) $(PJ_VIDEO_CFLAGS)
-export PJSUA2_LIB_CXXFLAGS = $(PJSUA2_LIB_CFLAGS)
+export PJSUA2_LIB_CXXFLAGS = $(_CXXFLAGS) $(PJ_VIDEO_CFLAGS)
export PJSUA2_LIB_LDFLAGS += $(PJSUA_LIB_LDLIB) \
$(PJSIP_UA_LDLIB) \
$(PJSIP_SIMPLE_LDLIB) \
@@ -165,7 +165,6 @@ export PJSUA2_TEST_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
export PJSUA2_TEST_CFLAGS += $(_CFLAGS) $(PJ_VIDEO_CFLAGS)
export PJSUA2_TEST_CXXFLAGS = $(PJSUA2_LIB_CFLAGS)
export PJSUA2_TEST_LDFLAGS += $(PJ_LDXXFLAGS) $(PJ_LDXXLIBS) $(LDFLAGS)
-export PJSUA2_TEST_EXE := pjsua2-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
@@ -195,7 +194,6 @@ export TEST_LDFLAGS += $(PJSIP_LDLIB) \
$(PJLIB_UTIL_LDLIB) \
$(PJNATH_LDLIB) \
$(_LDFLAGS)
-export TEST_EXE := pjsip-test-$(TARGET_NAME)$(HOST_EXE)
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT

View File

@ -0,0 +1,41 @@
{ stdenv
, fetchFromGitHub
, cmake
, asio
, openssl
, patches
}:
stdenv.mkDerivation rec {
name = "restbed-${version}";
version = "2016-09-15";
src = fetchFromGitHub {
owner = "Corvusoft";
repo = "restbed";
rev = "34187502642144ab9f749ab40f5cdbd8cb17a54a";
sha256 = "1jb38331fcicyiisqdprhq6zwfc6g518fm3l4qw9aiv5k9nqim22";
};
inherit patches;
buildInputs = [
cmake
asio
openssl
];
meta = with stdenv.lib; {
description = "HTTP framework for building networked applications";
longDescription = ''
HTTP framework for building networked applications that require seamless
and secure communication, with the flexability to model a range of
business processes. Targeting mobile, tablet, desktop, and embedded
production environments.
'';
homepage = https://corvusoft.co.uk/;
license = licenses.agpl;
maintainers = with maintainers; [ taeer ];
platforms = platforms.linux;
};
}

View File

@ -1089,6 +1089,8 @@ with pkgs;
syslogng_incubator = callPackage ../tools/system/syslog-ng-incubator { };
ring-daemon = callPackage ../applications/networking/instant-messengers/ring-daemon { };
rsyslog = callPackage ../tools/system/rsyslog {
hadoop = null; # Currently Broken
czmq = czmq3;