GNU bug report logs - #31331
[PATCH 1/2] gnu: Add bitlbee-discord.

Previous Next

Package: guix-patches;

Reported by: Pierre-Antoine Rouby <contact <at> parouby.fr>

Date: Tue, 1 May 2018 15:28:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #29 received at 31331 <at> debbugs.gnu.org (full text, mbox):

From: Pierre-Antoine Rouby <contact <at> parouby.fr>
To: ludo <at> gnu.org
Cc: 31331 <at> debbugs.gnu.org, Pierre-Antoine Rouby <contact <at> parouby.fr>
Subject: [PATCH 2/2] gnu: services: bitlbee: Add plugins.
Date: Thu, 10 May 2018 16:29:23 +0200
* gnu/services/messaging.scm (<bitlbee-configuration>): Add plugins argument.
  (bitlbee-shepherd-service): Update config file.
  (bitlbee-service): Add plugins argument.
---
 doc/guix.texi              |  3 +++
 gnu/services/messaging.scm | 15 +++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 87892fc89..b939097a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14880,6 +14880,9 @@ networking interface.
 @item @code{package} (default: @code{bitlbee})
 The BitlBee package to use.
 
+@item @code{plugins} (default: @code{plugins})
+The BitlBee plugins package to use.
+
 @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 80ffed0f2..0db086834 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2015, 2017, 2018 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2018 Pierre-Antoine Rouby <contact <at> parouby.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -783,20 +784,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)
@@ -860,6 +865,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 +881,5 @@ configuration file."
            (bitlbee-configuration
             (bitlbee bitlbee)
             (interface interface) (port port)
+            (plugins plugins)
             (extra-settings extra-settings))))
-- 
2.17.0





This bug report was last modified 7 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.