services: bitlbee: Add plugins.
authorPierre-Antoine Rouby <contact@parouby.fr>
Thu, 10 May 2018 14:37:58 +0000 (16:37 +0200)
committerLudovic Courtès <ludo@gnu.org>
Thu, 10 May 2018 22:15:59 +0000 (00:15 +0200)
* doc/guix.texi (Bitlbee Service): Add plugins.
* gnu/services/messaging.scm (<bitlbee-configuration>): Add plugins argument.
  (bitlbee-shepherd-service): Update config file.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
doc/guix.texi
gnu/services/messaging.scm

index 6aeb313..637c9c3 100644 (file)
@@ -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
index 273ba2c..4b7e724 100644 (file)
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -790,20 +791,24 @@ 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-shepherd-service
   (match-lambda
-    (($ <bitlbee-configuration> bitlbee interface port extra-settings)
-     (let ((conf (plain-file "bitlbee.conf"
-                             (string-append "
+    (($ <bitlbee-configuration> 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)