unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord.
@ 2018-05-01 12:05 Pierre-Antoine Rouby
  2018-05-01 17:38 ` [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins Pierre-Antoine Rouby
  2018-05-02 18:41 ` [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Nils Gillmann
  0 siblings, 2 replies; 11+ messages in thread
From: Pierre-Antoine Rouby @ 2018-05-01 12:05 UTC (permalink / raw)
  To: 31331; +Cc: Pierre-Antoine Rouby

* gnu/packages/messaging.scm (bitlbee-discord): New variable.
  (bitlbee): Add 'install-lib' phase.
---
 gnu/packages/messaging.scm | 50 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index fd1c330ce..d6bd588cb 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -181,6 +182,9 @@ end-to-end encryption.")
          (add-after 'install 'install-etc
            (lambda* (#:key (make-flags '()) #:allow-other-keys)
              (zero? (apply system* "make" "install-etc" make-flags))))
+         (add-after 'install-etc 'install-lib
+           (lambda* (#:key (make-flags '()) #:allow-other-keys)
+             (zero? (apply system* "make" "install-dev" make-flags))))
          (replace 'configure
            ;; bitlbee's configure script does not tolerate many of the
            ;; variable settings that Guix would pass to it.
@@ -199,6 +203,52 @@ identi.ca and status.net).")
     (home-page "http://www.bitlbee.org/")
     (license (list license:gpl2+ license:bsd-2))))
 
+(define-public bitlbee-discord
+  (package
+    (name "bitlbee-discord")
+    (version "0.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://github.com/sm00th/bitlbee-discord/"
+                "archive/" version ".tar.gz"))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1bwqxlg6fwj3749y7w69n9jwsdzf5nl9xqiszbpv9k8x1422i1y1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen
+           (lambda _
+             (invoke "sh" "autogen.sh")))
+         (add-before 'configure 'bash-path
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "configure"
+               (("\\$SHELL") (string-append (assoc-ref inputs "bash")
+                                            "/bin/sh")))))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (invoke "./configure"
+                     (string-append "--with-plugindir="
+                                    (assoc-ref outputs "out")
+                                    "/lib/bitlbee/")))))))
+    (inputs `(("glib" ,glib)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("texinfo" ,texinfo)
+                     ("libtool" ,libtool)
+                     ("bitlbee" ,bitlbee)
+                     ("bash" ,bash)))
+    (synopsis "IRC to instant messaging gateway discord plugin")
+    (description "This package is plugin for bitlbee IRC to other messaging
+gateway.")
+    (home-page "http://www.bitlbee.org/")
+    (license license:gpl2+)))
+
 (define-public hexchat
   (package
     (name "hexchat")
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins.
  2018-05-01 12:05 [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Pierre-Antoine Rouby
@ 2018-05-01 17:38 ` Pierre-Antoine Rouby
  2018-05-07  9:41   ` Ludovic Courtès
  2018-05-02 18:41 ` [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Nils Gillmann
  1 sibling, 1 reply; 11+ messages in thread
From: Pierre-Antoine Rouby @ 2018-05-01 17:38 UTC (permalink / raw)
  To: 31331; +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 <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.
 ;;;
@@ -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-configuration> bitlbee interface port extra-settings)
-     (let ((conf (plain-file "bitlbee.conf"
-                             (string-append "
-  [settings]
+    (($ <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 = " (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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord.
  2018-05-01 12:05 [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Pierre-Antoine Rouby
  2018-05-01 17:38 ` [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins Pierre-Antoine Rouby
@ 2018-05-02 18:41 ` Nils Gillmann
  2018-05-02 20:21   ` parouby
  1 sibling, 1 reply; 11+ messages in thread
From: Nils Gillmann @ 2018-05-02 18:41 UTC (permalink / raw)
  To: Pierre-Antoine Rouby; +Cc: 31331

Hi Pierre-Antoine,

this package definition is promising but needs some last tweaks.
I did not build it so far.

Pierre-Antoine Rouby transcribed 3.3K bytes:
> * gnu/packages/messaging.scm (bitlbee-discord): New variable.
>   (bitlbee): Add 'install-lib' phase.
> ---
>  gnu/packages/messaging.scm | 50 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index fd1c330ce..d6bd588cb 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -14,6 +14,7 @@
>  ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
>  ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
>  ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
> +;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -181,6 +182,9 @@ end-to-end encryption.")
>           (add-after 'install 'install-etc
>             (lambda* (#:key (make-flags '()) #:allow-other-keys)
>               (zero? (apply system* "make" "install-etc" make-flags))))
> +         (add-after 'install-etc 'install-lib
> +           (lambda* (#:key (make-flags '()) #:allow-other-keys)
> +             (zero? (apply system* "make" "install-dev" make-flags))))
>           (replace 'configure
>             ;; bitlbee's configure script does not tolerate many of the
>             ;; variable settings that Guix would pass to it.
> @@ -199,6 +203,52 @@ identi.ca and status.net).")
>      (home-page "http://www.bitlbee.org/")
>      (license (list license:gpl2+ license:bsd-2))))
>  
> +(define-public bitlbee-discord
> +  (package
> +    (name "bitlbee-discord")
> +    (version "0.4.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri
> +               (string-append
> +                "https://github.com/sm00th/bitlbee-discord/"
> +                "archive/" version ".tar.gz"))

Nitpick, I would write it like:

 +              (uri
 +               (string-append "https://github.com/sm00th/bitlbee-discord/"
 +                              "archive/" version ".tar.gz"))

> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "1bwqxlg6fwj3749y7w69n9jwsdzf5nl9xqiszbpv9k8x1422i1y1"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'autogen
> +           (lambda _
> +             (invoke "sh" "autogen.sh")))
> +         (add-before 'configure 'bash-path
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (substitute* "configure"
> +               (("\\$SHELL") (string-append (assoc-ref inputs "bash")
> +                                            "/bin/sh")))))

Is the configure.ac in this case special, or why doesn't it pick our SHELL
that is already in the environment of the build chroot?

> +         (replace 'configure
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (invoke "./configure"
> +                     (string-append "--with-plugindir="
> +                                    (assoc-ref outputs "out")
> +                                    "/lib/bitlbee/")))))))
> +    (inputs `(("glib" ,glib)))
> +    (native-inputs `(("pkg-config" ,pkg-config)
> +                     ("autoconf" ,autoconf)
> +                     ("automake" ,automake)
> +                     ("texinfo" ,texinfo)
> +                     ("libtool" ,libtool)
> +                     ("bitlbee" ,bitlbee)

Does the buildsystem of bitlbee-discord check for bitlbee, or why is this required?

> +                     ("bash" ,bash)))
> +    (synopsis "IRC to instant messaging gateway discord plugin")

It's a bitlbee plugin, how about:

"Discord plugin for Bitlbee"

> +    (description "This package is plugin for bitlbee IRC to other messaging
> +gateway.")

You could write:

"Bitblee-discord is a plugin for Bitlbee which provides access to servers
running the Discord protocol"


I'm not very well informed about Discord, so other people might know more.

> +    (home-page "http://www.bitlbee.org/")

Here we use either the homepage, and if it doesn't exist we link to
a webview of the sourcecode or its directory on an httpd where the
source is, in this case you'd use

"https://github.com/sm00th/bitlbee-discord/"

> +    (license license:gpl2+)))
> +
>  (define-public hexchat
>    (package
>      (name "hexchat")
> -- 
> 2.17.0
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord.
  2018-05-02 18:41 ` [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Nils Gillmann
@ 2018-05-02 20:21   ` parouby
  2018-05-02 20:30     ` Nils Gillmann
  0 siblings, 1 reply; 11+ messages in thread
From: parouby @ 2018-05-02 20:21 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: 31331

Hi Nils,

On 02/05/2018 20:41, Nils Gillmann wrote:
>> +               (string-append
>> +                "https://github.com/sm00th/bitlbee-discord/"
>> +                "archive/" version ".tar.gz"))
> 
> Nitpick, I would write it like:>  +              (uri
>  +               (string-append "https://github.com/sm00th/bitlbee-discord/"
>  +                              "archive/" version ".tar.gz"))

Yes, it's true, my bad !

>> +         (add-before 'configure 'bash-path
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (substitute* "configure"
>> +               (("\\$SHELL") (string-append (assoc-ref inputs "bash")
>> +                                            "/bin/sh")))))
> 
> Is the configure.ac in this case special, or why doesn't it pick our SHELL
> that is already in the environment of the build chroot?

In this case, without modification the configure try to run '/bin/bash'
and don't care about 'SHELL' environment variable.
I don't found any other way. Any idea ?

>> +    (native-inputs `(("pkg-config" ,pkg-config)
>> +                     ("autoconf" ,autoconf)
>> +                     ("automake" ,automake)
>> +                     ("texinfo" ,texinfo)
>> +                     ("libtool" ,libtool)
>> +                     ("bitlbee" ,bitlbee)
> 
> Does the buildsystem of bitlbee-discord check for bitlbee, or why is this required?

Yes it's need bitlbee lib and header for compilation (just like
bitlbee-dev debian package).

Thanks,
--
Pierre-Antoine

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord.
  2018-05-02 20:21   ` parouby
@ 2018-05-02 20:30     ` Nils Gillmann
  2018-05-05 15:57       ` Pierre-Antoine Rouby
  0 siblings, 1 reply; 11+ messages in thread
From: Nils Gillmann @ 2018-05-02 20:30 UTC (permalink / raw)
  To: parouby; +Cc: 31331, Nils Gillmann

parouby transcribed 1.5K bytes:
> Hi Nils,
> 
> On 02/05/2018 20:41, Nils Gillmann wrote:
> >> +               (string-append
> >> +                "https://github.com/sm00th/bitlbee-discord/"
> >> +                "archive/" version ".tar.gz"))
> > 
> > Nitpick, I would write it like:>  +              (uri
> >  +               (string-append "https://github.com/sm00th/bitlbee-discord/"
> >  +                              "archive/" version ".tar.gz"))
> 
> Yes, it's true, my bad !
> 
> >> +         (add-before 'configure 'bash-path
> >> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> >> +             (substitute* "configure"
> >> +               (("\\$SHELL") (string-append (assoc-ref inputs "bash")
> >> +                                            "/bin/sh")))))
> > 
> > Is the configure.ac in this case special, or why doesn't it pick our SHELL
> > that is already in the environment of the build chroot?
> 
> In this case, without modification the configure try to run '/bin/bash'
> and don't care about 'SHELL' environment variable.
> I don't found any other way. Any idea ?

You could grep the guix source, folder gnu/packages, for cases where
SHELL is set. Examples that come to my mind right now are in autotools.scm
as well as gnuzilla.scm if I remember correctly.

I would try setting the shell via environment variables or make/configure flags
before  patching in a file that I generated before.
As a fallback that would be okay too, I think I did something similar to what
you did in my Newmoon/Palemoon package.

> >> +    (native-inputs `(("pkg-config" ,pkg-config)
> >> +                     ("autoconf" ,autoconf)
> >> +                     ("automake" ,automake)
> >> +                     ("texinfo" ,texinfo)
> >> +                     ("libtool" ,libtool)
> >> +                     ("bitlbee" ,bitlbee)
> > 
> > Does the buildsystem of bitlbee-discord check for bitlbee, or why is this required?
> 
> Yes it's need bitlbee lib and header for compilation (just like
> bitlbee-dev debian package).

I see. Okay.

> Thanks,
> --
> Pierre-Antoine

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord.
  2018-05-02 20:30     ` Nils Gillmann
@ 2018-05-05 15:57       ` Pierre-Antoine Rouby
  2018-05-07  9:49         ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Antoine Rouby @ 2018-05-05 15:57 UTC (permalink / raw)
  To: gillmann; +Cc: 31331, Pierre-Antoine Rouby

* gnu/packages/messaging.scm (bitlbee-discord): New variable.
  (bitlbee): Add 'install-lib' phase.
---
 gnu/packages/messaging.scm | 47 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index fd1c330ce..6a953e7d1 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -181,6 +182,9 @@ end-to-end encryption.")
          (add-after 'install 'install-etc
            (lambda* (#:key (make-flags '()) #:allow-other-keys)
              (zero? (apply system* "make" "install-etc" make-flags))))
+         (add-after 'install-etc 'install-lib
+           (lambda* (#:key (make-flags '()) #:allow-other-keys)
+             (zero? (apply system* "make" "install-dev" make-flags))))
          (replace 'configure
            ;; bitlbee's configure script does not tolerate many of the
            ;; variable settings that Guix would pass to it.
@@ -199,6 +203,49 @@ identi.ca and status.net).")
     (home-page "http://www.bitlbee.org/")
     (license (list license:gpl2+ license:bsd-2))))
 
+(define-public bitlbee-discord
+  (package
+    (name "bitlbee-discord")
+    (version "0.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "https://github.com/sm00th/bitlbee-discord/"
+                              "archive/" version ".tar.gz"))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1bwqxlg6fwj3749y7w69n9jwsdzf5nl9xqiszbpv9k8x1422i1y1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen
+           (lambda _
+             (let ((sh (which "sh")))
+                 (substitute* "autogen.sh" (("/bin/sh") sh))
+                 (setenv "CONFIG_SHELL" sh)
+                 (zero? (system* "./autogen.sh")))))
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (invoke "./configure"
+                     (string-append "--with-plugindir="
+                                    (assoc-ref outputs "out")
+                                    "/lib/bitlbee/")))))))
+    (inputs `(("glib" ,glib)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("texinfo" ,texinfo)
+                     ("libtool" ,libtool)
+                     ("bitlbee" ,bitlbee) ; Need ditlbee devel header
+                     ("bash" ,bash)))
+    (synopsis "Discord plugin for Bitlbee")
+    (description "Bitlbee-discord is a plugin for Bitlbee witch provides
+access to servers running the Discord protocol.")
+    (home-page "https://github.com/sm00th/bitlbee-discord/")
+    (license license:gpl2+)))
+
 (define-public hexchat
   (package
     (name "hexchat")
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins.
  2018-05-01 17:38 ` [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins Pierre-Antoine Rouby
@ 2018-05-07  9:41   ` Ludovic Courtès
  2018-05-10 14:29     ` Pierre-Antoine Rouby
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2018-05-07  9:41 UTC (permalink / raw)
  To: Pierre-Antoine Rouby; +Cc: 31331

Hello!

Pierre-Antoine Rouby <contact@parouby.fr> skribis:

> * gnu/services/messaging.scm (bitlbee): Add plugins argument.

Please mention the changes to <bitlbee-configuration> and
‘bitlbee-shepherd-service’.  (There’s no variable named ‘bitlbee’ in
this file, so the above message wouldn’t work.)

>    (port bitlbee-configuration-port
>          (default 6667))
> +  (plugins bitlbee-plugins
> +           (default '()))

Please update doc/guix.texi to mention the new field.

> +(define (bitlbee-plugin-directory plugins)
> +  "Return a directory containing PLUGINS."
> +  (directory-union "bitlbee-plugins" plugins))
> +
>  (define bitlbee-shepherd-service
>    (match-lambda
> -    (($ <bitlbee-configuration> bitlbee interface port extra-settings)
> -     (let ((conf (plain-file "bitlbee.conf"
> -                             (string-append "
> -  [settings]
> +    (($ <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 = " (bitlbee-plugin-directory plugins) "/lib/bitlbee

I think you could inline the ‘directory-union’ call here; no need to
define ‘bitlbee-plugin-directory’.

> @@ -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 ""))

You can omit this bit because this procedure is deprecated.

Could you send an updated patch?

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord.
  2018-05-05 15:57       ` Pierre-Antoine Rouby
@ 2018-05-07  9:49         ` Ludovic Courtès
  0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2018-05-07  9:49 UTC (permalink / raw)
  To: Pierre-Antoine Rouby; +Cc: 31331, gillmann

Pierre-Antoine Rouby <contact@parouby.fr> skribis:

> * gnu/packages/messaging.scm (bitlbee-discord): New variable.
>   (bitlbee): Add 'install-lib' phase.

I made it two separate patches and applied.

Thank you, and thanks Nils for the review!

Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins.
  2018-05-07  9:41   ` Ludovic Courtès
@ 2018-05-10 14:29     ` Pierre-Antoine Rouby
  2018-05-10 14:37       ` Pierre-Antoine Rouby
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Antoine Rouby @ 2018-05-10 14:29 UTC (permalink / raw)
  To: ludo; +Cc: 31331, Pierre-Antoine Rouby

* 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@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.
 ;;;
@@ -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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins.
  2018-05-10 14:29     ` Pierre-Antoine Rouby
@ 2018-05-10 14:37       ` Pierre-Antoine Rouby
  2018-05-10 20:29         ` bug#31331: " Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre-Antoine Rouby @ 2018-05-10 14:37 UTC (permalink / raw)
  To: ludo; +Cc: 31331, Pierre-Antoine Rouby

* doc/guix.texi (Bitlbee Service): Add plugins.
* 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@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.
 ;;;
@@ -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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#31331: [PATCH 2/2] gnu: services: bitlbee: Add plugins.
  2018-05-10 14:37       ` Pierre-Antoine Rouby
@ 2018-05-10 20:29         ` Ludovic Courtès
  0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2018-05-10 20:29 UTC (permalink / raw)
  To: Pierre-Antoine Rouby; +Cc: 31331-done

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Hello,

Pierre-Antoine Rouby <contact@parouby.fr> skribis:

> * doc/guix.texi (Bitlbee Service): Add plugins.
> * gnu/services/messaging.scm (<bitlbee-configuration>): Add plugins argument.
>   (bitlbee-shepherd-service): Update config file.
>   (bitlbee-service): Add plugins argument.

Applied with these minor changes:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1370 bytes --]

diff --git a/doc/guix.texi b/doc/guix.texi
index 1acff10dc..637c9c3f4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14985,8 +14985,8 @@ 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{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.
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index c5ad96cc0..4b7e724a7 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -872,7 +872,6 @@ 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.
@@ -888,5 +887,4 @@ configuration file."
            (bitlbee-configuration
             (bitlbee bitlbee)
             (interface interface) (port port)
-            (plugins plugins)
             (extra-settings extra-settings))))

[-- Attachment #3: Type: text/plain, Size: 26 bytes --]


Thank you!

Ludo’.

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-05-10 20:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-01 12:05 [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Pierre-Antoine Rouby
2018-05-01 17:38 ` [bug#31331] [PATCH 2/2] gnu: services: bitlbee: Add plugins Pierre-Antoine Rouby
2018-05-07  9:41   ` Ludovic Courtès
2018-05-10 14:29     ` Pierre-Antoine Rouby
2018-05-10 14:37       ` Pierre-Antoine Rouby
2018-05-10 20:29         ` bug#31331: " Ludovic Courtès
2018-05-02 18:41 ` [bug#31331] [PATCH 1/2] gnu: Add bitlbee-discord Nils Gillmann
2018-05-02 20:21   ` parouby
2018-05-02 20:30     ` Nils Gillmann
2018-05-05 15:57       ` Pierre-Antoine Rouby
2018-05-07  9:49         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).