From 36d619e85d29d1fb2e4a36406c8bc6f999484f07 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Thu, 10 May 2018 16:37:58 +0200 Subject: [PATCH] services: bitlbee: Add plugins. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix.texi (Bitlbee Service): Add plugins. * gnu/services/messaging.scm (): Add plugins argument. (bitlbee-shepherd-service): Update config file. Signed-off-by: Ludovic Courtès --- doc/guix.texi | 3 +++ gnu/services/messaging.scm | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6aeb313773..637c9c3f4d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14985,6 +14985,9 @@ networking interface. @item @code{package} (default: @code{bitlbee}) The BitlBee package to use. +@item @code{plugins} (default: @code{'()}) +List of plugin packages to use---e.g., @code{bitlbee-discord}. + @item @code{extra-settings} (default: @code{""}) Configuration snippet added as-is to the BitlBee configuration file. @end table diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 273ba2cc14..4b7e724a78 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. ;;; @@ -790,20 +791,24 @@ (define-record-type* (default "127.0.0.1")) (port bitlbee-configuration-port (default 6667)) + (plugins bitlbee-plugins + (default '())) (extra-settings bitlbee-configuration-extra-settings (default ""))) (define bitlbee-shepherd-service (match-lambda - (($ bitlbee interface port extra-settings) - (let ((conf (plain-file "bitlbee.conf" - (string-append " + (($ 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 = " (directory-union "bitlbee-plugins" plugins) "/lib/bitlbee +" extra-settings))) (with-imported-modules (source-module-closure '((gnu build shepherd)