diff options
author | Ivan Gankevich <igankevich@capybaramail.xyz> | 2023-04-16 11:47:27 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-05-03 12:36:08 +0200 |
commit | 0cbbc1996d366ee8408898ae255085e745f3d292 (patch) | |
tree | 5260585abcacf1e23f2dd1fa5c26c1b4dcaa3aa0 /gnu/packages | |
parent | 9b9883c7730606a616f63e1a4a35b9735be5e9f6 (diff) |
gnu: Add sipp.
* gnu/packages/telephony.scm (sipp): New variable.
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/telephony.scm | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 483c91aa32..aa65c4eaad 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -23,6 +23,7 @@ ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; Copyright © 2021 Demis Balbach <db@minikn.xyz> ;;; Copyright © 2022 Thomas Albers Raviola <thomas@thomaslabs.org> +;;; Copyright © 2023 Ivan Gankevich <igankevich@capybaramail.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,6 +41,7 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages telephony) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages aidc) @@ -70,6 +72,7 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages linphone) #:use-module (gnu packages linux) + #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) @@ -1036,3 +1039,64 @@ It supports the following smartphones: @end itemize") (home-page "https://github.com/2b-as/xgoldmon") (license license:gpl2+)))) + +(define-public sipp + (package + (name "sipp") + (version "3.7.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/SIPp/sipp") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 (base32 "0vplccia9zdva1wwny2xgs0b6rzmq4abxvw8lyz61wfw7jjmvin0")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DUSE_GSL=1" "-DUSE_PCAP=1" "-DUSE_SSL=1" "-DUSE_SCTP=1") + #:phases + #~(modify-phases %standard-phases + ;; Modify build instructions to use external GTEST and GMOCK. + (add-before 'configure 'unbundle-gtest + (lambda _ + (rmdir "gtest") + (symlink (assoc-ref %build-inputs "googletest") "gtest") + (substitute* "CMakeLists.txt" + ((".*gtest-all.*") "") + ((".*gmock-all.*") "") + (("target_compile_features\\(sipp_unittest" all) + (string-append "target_link_libraries(sipp_unittest gtest gmock)\n" + all))))) + ;; Generate version.h without GIT. + (add-before 'configure 'fix-version + (lambda _ + (copy-file "include/version.h.in" "include/version.h") + (substitute* "include/version.h" (("@VERSION@") #$version)) + (substitute* "CMakeLists.txt" (("find_package\\(Git\\)") "")))) + (add-after 'build 'build-tests + (lambda* (#:key parallel-build? #:allow-other-keys) + (invoke "make" + (string-append + "-j" (if parallel-build? + (number->string (parallel-job-count)) + "1")) + "sipp_unittest"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./sipp_unittest"))))))) + (inputs + (list gsl libpcap lksctp-tools ncurses/tinfo openssl)) + (native-inputs + (list googletest pkg-config)) + (synopsis "Performance testing tool for the SIP protocol") + (description "SIPp can be used to test many real SIP equipements like SIP +proxies, B2BUAs, SIP media servers, SIP/x gateways, and SIP PBXes. It is also +very useful to emulate thousands of user agents calling your SIP system.") + (home-page "https://sipp.readthedocs.io/") + (license (list license:gpl2+ ; sipp's main license + license:bsd-3 ; send_packets.c, send_packets.h + license:zlib)))) ; md5.c, md5.h |