From 49d7746ada4d4674acbbfd2606ad9bff4f6207eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 15 Nov 2020 17:04:18 +0100 Subject: [PATCH 4/4] gnu: bitlbee: Add "libpurple" parameter. * gnu/packages/messaging.scm (bitlbee)[inputs]: Add optional PIDGIN input. [properties]: New field. (bitlbee-purple): Mark as deprecated. --- gnu/packages/messaging.scm | 43 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index b462504894..2f0f44d10d 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -120,6 +120,7 @@ #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix parameters) #:use-module (guix hg-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -256,7 +257,8 @@ end-to-end encryption.") ("libotr" ,libotr) ("gnutls" ,gnutls) ("python" ,python) - ("perl" ,perl))) + ("perl" ,perl) + ,@(optionally 'libpurple? `("purple" ,pidgin)))) (arguments `(#:phases (modify-phases %standard-phases @@ -275,7 +277,21 @@ end-to-end encryption.") (invoke "./configure" (string-append "--prefix=" (assoc-ref outputs "out")) - "--otr=1")))))) + "--otr=1" + ,@(optionally 'libpurple? "--purple=1"))))) + + ;; XXX: Tests fail to link, and ./configure says that it's "supported + ;; on a best-effort basis" anyway. + #:tests? ,(not (assq-ref (package-properties this-package) + 'libpurple?)))) + (properties + `((parameters + ,(package-parameter (name "libpurple") + (description + "Whether to enable libpurple (Pidgin) +support.") + (property 'libpurple?) + (type boolean))))) (synopsis "IRC to instant messaging gateway") (description "BitlBee brings IM (instant messaging) to IRC clients, for people who have an IRC client running all the time and don't want to run an @@ -289,25 +305,10 @@ identi.ca and status.net).") (define-public bitlbee-purple ;; This variant uses libpurple, which provides support for more protocols at ;; the expense of a much bigger closure. - (package/inherit bitlbee - (name "bitlbee-purple") - (synopsis "IRC to instant messaging gateway (using Pidgin's libpurple)") - (inputs `(("purple" ,pidgin) - ,@(package-inputs bitlbee))) - (arguments - (substitute-keyword-arguments (package-arguments bitlbee) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (replace 'configure ;add "--purple=1" - (lambda* (#:key outputs #:allow-other-keys) - (invoke "./configure" - (string-append "--prefix=" - (assoc-ref outputs "out")) - "--otr=1" "--purple=1"))))) - ((#:tests? _ #t) - ;; XXX: Tests fail to link, and ./configure says that it's "supported - ;; on a best-effort basis" anyway. - #f))))) + (deprecated-package "bitlbee-purple" + (package/inherit bitlbee + (properties `((libpurple? . #t) + ,@(package-properties bitlbee)))))) (define-public bitlbee-discord (package -- 2.29.2