Subject: [PATCH 10/22] gnu: Add gnutls-jami (not yet working).

From: Jan Wielkiewicz <[email-masked]>
Date: Mon, 6 Jan 2020 02:11:40 +0100

---
 gnu/packages/jami.scm | 51 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index 8b24984bd5..db2e52d27f 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -45,6 +45,7 @@
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages telephony)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages upnp)
   #:use-module (gnu packages video)
@@ -219,6 +220,56 @@
                 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
              #t)))))))
 
+(define-public gnutls-jami
+  (package
+   (inherit gnutls)
+   (name "gnutls-jami")
+   (native-inputs
+    `(("savoir-faire-linux-patches" ,(jami-source))
+      ("automake" ,automake)
+      ("autoconf" ,autoconf)
+      ("datefudge" ,datefudge)
+      ("openssl" ,openssl)
+      ,@(package-native-inputs gnutls)))
+   (version "3.6.10")
+    (source (origin
+             (method url-fetch)
+             (uri
+              (string-append "mirror://gnupg/gnutls/v"
+                             (version-major+minor version)
+                             "/gnutls-" version ".tar.xz"))
+             ;;(patches (search-patches "gnutls-skip-trust-store-test.patch"))
+             (sha256
+              (base32
+               "14r2h73yfj66cm14k9mnb3kgzq5a7qjg5b31m53bf19vcxkwmwxi"))))
+   (arguments
+    (substitute-keyword-arguments (package-arguments gnutls)
+				  ((#:configure-flags '())
+				   '("--disable-gtk-doc"
+				     "--without-p11-kit"
+				     "--disable-cxx"
+				     "--disable-srp-authentication"
+				     "--disable-psk-authentication-FIXME"
+				     "--with-included-libtasn1"
+				     "--with-included-unistring"
+				     "--disable-openpgp-authentication"
+				     "--disable-openssl-compatibility"
+				     "--disable-guile"
+				     "--disable-nls"
+				     "--disable-dtls-srtp-support"
+				     "--without-libintl-prefix"
+				     "--without-idn"))
+				  ((#:phases phases)
+				   `(modify-phases ,phases
+						   (add-after 'unpack 'apply-patches
+							      (lambda* (#:key inputs #:allow-other-keys)
+								       (let ((jami-apply-dependency-patches ,jami-apply-dependency-patches))
+									 (jami-apply-dependency-patches #:inputs inputs
+													#:dep-name "gnutls"
+													#:patches
+													'("downgrade-gettext-requirement"))
+									 #t)))))))))
+
 (define-public ffmpeg-jami
   (package
    (inherit ffmpeg)
-- 
2.24.1