From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDZJt-0002c2-C3 for guix-patches@gnu.org; Tue, 01 May 2018 13:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDZJq-00066F-84 for guix-patches@gnu.org; Tue, 01 May 2018 13:44:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38128) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDZJq-00065z-5U for guix-patches@gnu.org; Tue, 01 May 2018 13:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fDZJp-0000UI-Iu for guix-patches@gnu.org; Tue, 01 May 2018 13:44:01 -0400 Subject: [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins. References: <20180501120535.13961-1-contact@parouby.fr> In-Reply-To: <20180501120535.13961-1-contact@parouby.fr> Resent-Message-ID: From: Pierre-Antoine Rouby Date: Tue, 1 May 2018 19:38:27 +0200 Message-Id: <20180501173827.14527-1-contact@parouby.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31331@debbugs.gnu.org Cc: Pierre-Antoine Rouby * gnu/services/messaging.scm (bitlbee): Add plugins argument. --- gnu/services/messaging.scm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 80ffed0f2..d10fef590 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017, 2018 Clément Lassieur ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2015, 2017, 2018 Ludovic Courtès +;;; Copyright © 2018 Pierre-Antoine Rouby ;;; ;;; This file is part of GNU Guix. ;;; @@ -783,20 +784,27 @@ string, you could instantiate a prosody service like this: (default "127.0.0.1")) (port bitlbee-configuration-port (default 6667)) + (plugins bitlbee-plugins + (default '())) (extra-settings bitlbee-configuration-extra-settings (default ""))) +(define (bitlbee-plugin-directory plugins) + "Return a directory containing PLUGINS." + (directory-union "bitlbee-plugins" plugins)) + (define bitlbee-shepherd-service (match-lambda - (($ bitlbee interface port extra-settings) - (let ((conf (plain-file "bitlbee.conf" - (string-append " - [settings] + (($ bitlbee interface port + plugins extra-settings) + (let ((conf (mixed-text-file "bitlbee.conf" + " [settings] User = bitlbee ConfigDir = /var/lib/bitlbee DaemonInterface = " interface " DaemonPort = " (number->string port) " -" extra-settings)))) + PluginDir = " (bitlbee-plugin-directory plugins) "/lib/bitlbee +" extra-settings))) (with-imported-modules (source-module-closure '((gnu build shepherd) @@ -860,6 +868,7 @@ a gateway between IRC and chat networks."))) (define* (bitlbee-service #:key (bitlbee bitlbee) ;deprecated (interface "127.0.0.1") (port 6667) + (plugins '()) (extra-settings "")) "Return a service that runs @url{http://bitlbee.org,BitlBee}, a daemon that acts as a gateway between IRC and chat networks. @@ -875,4 +884,5 @@ configuration file." (bitlbee-configuration (bitlbee bitlbee) (interface interface) (port port) + (plugins plugins) (extra-settings extra-settings)))) -- 2.17.0