aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/messaging.scm
blob: aa398970b6becf677e146f920f6de30d046c0ea5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu services messaging)
  #:use-module (gnu packages messaging)
  #:use-module (gnu packages admin)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (gnu services configuration)
  #:use-module (gnu system shadow)
  #:use-module (guix gexp)
  #:use-module (guix records)
  #:use-module (guix packages)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-35)
  #:use-module (ice-9 match)
  #:export (prosody-service-type
            prosody-configuration
            opaque-prosody-configuration

            virtualhost-configuration
            int-component-configuration
            ext-component-configuration

            mod-muc-configuration
            ssl-configuration

            %default-modules-enabled))

;;; Commentary:
;;;
;;; Messaging services.
;;;
;;; Code:

(define (id ctx . parts)
  (datum->syntax ctx (apply symbol-append (map syntax->datum parts))))

(define-syntax define-maybe
  (lambda (x)
    (syntax-case x ()
      ((_ stem)
       (with-syntax
           ((stem?                (id #'stem #'stem #'?))
            (maybe-stem?          (id #'stem #'maybe- #'stem #'?))
            (serialize-stem       (id #'stem #'serialize- #'stem))
            (serialize-maybe-stem (id #'stem #'serialize-maybe- #'stem)))
         #'(begin
             (define (maybe-stem? val)
               (or (eq? val 'disabled) (stem? val)))
             (define (serialize-maybe-stem field-name val)
               (when (stem? val) (serialize-stem field-name val)))))))))

(define-syntax define-all-configurations
  (lambda (stx)
    (define (make-pred arg)
      (lambda (field target)
        (and (memq (syntax->datum target) `(common ,arg)) field)))
    (syntax-case stx ()
      ((_ stem (field (field-type def) doc target) ...)
       (with-syntax (((new-field-type ...)
                      (map (lambda (field-type target)
                             (if (and (eq? 'common (syntax->datum target))
                                      (not (string-prefix?
                                            "maybe-"
                                            (symbol->string
                                             (syntax->datum field-type)))))
                                 (id #'stem #'maybe- field-type) field-type))
                           #'(field-type ...) #'(target ...)))
                     ((new-def ...)
                      (map (lambda (def target)
                             (if (eq? 'common (syntax->datum target))
                                 #''disabled def))
                           #'(def ...) #'(target ...)))
                     ((new-doc ...)
                      (map (lambda (doc target)
                             (if (eq? 'common (syntax->datum target))
                                 "" doc))
                           #'(doc ...) #'(target ...))))
         #`(begin
             (define common-fields
               '(#,@(filter-map (make-pred #f) #'(field ...) #'(target ...))))
             (define-configuration prosody-configuration
               #,@(filter-map (make-pred 'global)
                              #'((field (field-type def) doc) ...)
                              #'(target ...)))
             (define-configuration virtualhost-configuration
               #,@(filter-map (make-pred 'virtualhost)
                              #'((field (new-field-type new-def) new-doc) ...)
                              #'(target ...)))
             (define-configuration int-component-configuration
               #,@(filter-map (make-pred 'int-component)
                              #'((field (new-field-type new-def) new-doc) ...)
                              #'(target ...)))
             (define-configuration ext-component-configuration
               #,@(filter-map (make-pred 'ext-component)
                              #'((field (new-field-type new-def) new-doc) ...)
                              #'(target ...)))))))))

(define (uglify-field-name field-name)
  (let ((str (symbol->string field-name)))
    (string-join (string-split (if (string-suffix? "?" str)
                                   (substring str 0 (1- (string-length str)))
                                   str)
                               #\-)
                 "_")))

(define (serialize-field field-name val)
  (format #t "~a = ~a;\n" (uglify-field-name field-name) val))
(define (serialize-field-list field-name val)
  (serialize-field field-name
                   (with-output-to-string
                     (lambda ()
                       (format #t "{\n")
                       (for-each (lambda (x)
                                   (format #t "~a;\n" x))
                                 val)
                       (format #t "}")))))

(define (serialize-boolean field-name val)
  (serialize-field field-name (if val "true" "false")))
(define-maybe boolean)

(define (string-or-boolean? val)
  (or (string? val) (boolean? val)))
(define (serialize-string-or-boolean field-name val)
  (if (string? val)
      (serialize-string field-name val)
      (serialize-boolean field-name val)))

(define (non-negative-integer? val)
  (and (exact-integer? val) (not (negative? val))))
(define (serialize-non-negative-integer field-name val)
  (serialize-field field-name val))
(define-maybe non-negative-integer)

(define (non-negative-integer-list? val)
  (and (list? val) (and-map non-negative-integer? val)))
(define (serialize-non-negative-integer-list field-name val)
  (serialize-field-list field-name val))
(define-maybe non-negative-integer-list)

(define (enclose-quotes s)
  (format #f "\"~a\"" s))
(define (serialize-string field-name val)
  (serialize-field field-name (enclose-quotes val)))
(define-maybe string)

(define (string-list? val)
  (and (list? val)
       (and-map (lambda (x)
                  (and (string? x) (not (string-index x #\,))))
                val)))
(define (serialize-string-list field-name val)
  (serialize-field-list field-name (map enclose-quotes val)))
(define-maybe string-list)

(define (module-list? val)
  (string-list? val))
(define (serialize-module-list field-name val)
  (serialize-string-list field-name (cons "posix" val)))
(define-maybe module-list)

(define (file-name? val)
  (and (string? val)
       (string-prefix? "/" val)))
(define (serialize-file-name field-name val)
  (serialize-string field-name val))
(define-maybe file-name)

(define (file-name-list? val)
  (and (list? val) (and-map file-name? val)))
(define (serialize-file-name-list field-name val)
  (serialize-string-list field-name val))
(define-maybe file-name)

(define-configuration mod-muc-configuration
  (name
   (string "Prosody Chatrooms")
   "The name to return in service discovery responses.")

  (restrict-room-creation
   (string-or-boolean #f)
   "If @samp{#t}, this will only allow admins to create new chatrooms.
Otherwise anyone can create a room.  The value @samp{\"local\"} restricts room
creation to users on the service's parent domain.  E.g. @samp{user@@example.com}
can create rooms on @samp{rooms.example.com}.  The value @samp{\"admin\"}
restricts to service administrators only.")

  (max-history-messages
   (non-negative-integer 20)
   "Maximum number of history messages that will be sent to the member that has
just joined the room."))
(define (serialize-mod-muc-configuration field-name val)
  (serialize-configuration val mod-muc-configuration-fields))
(define-maybe mod-muc-configuration)

(define-configuration ssl-configuration
  (protocol
   (maybe-string 'disabled)
   "This determines what handshake to use.")

  (key
   (file-name "/etc/prosody/certs/key.pem")
   "Path to your private key file, relative to @code{/etc/prosody}.")

  (certificate
   (file-name "/etc/prosody/certs/cert.pem")
   "Path to your certificate file, relative to @code{/etc/prosody}.")

  (capath
   (file-name "/etc/ssl/certs")
   "Path to directory containing root certificates that you wish Prosody to
trust when verifying the certificates of remote servers.")

  (cafile
   (maybe-file-name 'disabled)
   "Path to a file containing root certificates that you wish Prosody to trust.
Similar to @code{capath} but with all certificates concatenated together.")

  (verify
   (maybe-string-list 'disabled)
   "A list of verification options (these mostly map to OpenSSL's
@code{set_verify()} flags).")

  (options
   (maybe-string-list 'disabled)
   "A list of general options relating to SSL/TLS.  These map to OpenSSL's
@code{set_options()}.  For a full list of options available in LuaSec, see the
LuaSec source.")

  (depth
   (maybe-non-negative-integer 'disabled)
   "How long a chain of certificate authorities to check when looking for a
trusted root certificate.")

  (ciphers
   (maybe-string 'disabled)
   "An OpenSSL cipher string.  This selects what ciphers Prosody will offer to
clients, and in what order.")

  (dhparam
   (maybe-file-name 'disabled)
   "A path to a file containing parameters for Diffie-Hellman key exchange.  You
can create such a file with:
@code{openssl dhparam -out /etc/prosody/certs/dh-2048.pem 2048}")

  (curve
   (maybe-string 'disabled)
   "Curve for Elliptic curve Diffie-Hellman. Prosody's default is
@samp{\"secp384r1\"}.")

  (verifyext
   (maybe-string-list 'disabled)
   "A list of \"extra\" verification options.")

  (password
   (maybe-string 'disabled)
   "Password for encrypted private keys."))
(define (serialize-ssl-configuration field-name val)
  (format #t "ssl = {\n")
  (serialize-configuration val ssl-configuration-fields)
  (format #t "};\n"))
(define-maybe ssl-configuration)

(define %default-modules-enabled
  '("roster"
    "saslauth"
    "tls"
    "dialback"
    "disco"
    "private"
    "vcard"
    "version"
    "uptime"
    "time"
    "ping"
    "pep"
    "register"
    "admin_adhoc"))

;; Guile bug.  Use begin wrapper, because otherwise virtualhost-configuration
;; is assumed to be a function.  See
;; https://www.gnu.org/software/guile/manual/html_node/R6RS-Incompatibilities.html
(begin
  (define (virtualhost-configuration-list? val)
    (and (list? val) (and-map virtualhost-configuration? val)))
  (define (serialize-virtualhost-configuration-list l)
    (for-each
     (lambda (val) (serialize-virtualhost-configuration val)) l))

  (define (int-component-configuration-list? val)
    (and (list? val) (and-map int-component-configuration? val)))
  (define (serialize-int-component-configuration-list l)
    (for-each
     (lambda (val) (serialize-int-component-configuration val)) l))

  (define (ext-component-configuration-list? val)
    (and (list? val) (and-map ext-component-configuration? val)))
  (define (serialize-ext-component-configuration-list l)
    (for-each
     (lambda (val) (serialize-ext-component-configuration val)) l))

  (define-all-configurations prosody-configuration
    (prosody
     (package prosody)
     "The Prosody package."
     global)

    (data-path
     (file-name "/var/lib/prosody")
     "Location of the Prosody data storage directory.  See
@url{http://prosody.im/doc/configure}."
     global)

    (plugin-paths
     (file-name-list '())
     "Additional plugin directories.  They are searched in all the specified
paths in order.  See @url{http://prosody.im/doc/plugins_directory}."
     global)

    (admins
     (string-list '())
     "This is a list of accounts that are admins for the server.  Note that you
must create the accounts separately.  See @url{http://prosody.im/doc/admins} and
@url{http://prosody.im/doc/creating_accounts}.
Example: @code{(admins '(\"user1@@example.com\" \"user2@@example.net\"))}"
     common)

    (use-libevent?
     (boolean #f)
     "Enable use of libevent for better performance under high load.  See
@url{http://prosody.im/doc/libevent}."
     common)

    (modules-enabled
     (module-list %default-modules-enabled)
     "This is the list of modules Prosody will load on startup.  It looks for
@code{mod_modulename.lua} in the plugins folder, so make sure that exists too.
Documentation on modules can be found at: @url{http://prosody.im/doc/modules}.
Defaults to @samp{%default-modules-enabled}."
     common)

    (modules-disabled
     (string-list '())
     "@samp{\"offline\"}, @samp{\"c2s\"} and @samp{\"s2s\"} are auto-loaded, but
should you want to disable them then add them to this list."
     common)

    (groups-file
     (file-name "/var/lib/prosody/sharedgroups.txt")
     "Path to a text file where the shared groups are defined.  If this path is
empty then @samp{mod_groups} does nothing.  See
@url{http://prosody.im/doc/modules/mod_groups}."
     common)

    (allow-registration?
     (boolean #f)
     "Disable account creation by default, for security.  See
@url{http://prosody.im/doc/creating_accounts}."
     common)

    (ssl
     (maybe-ssl-configuration (ssl-configuration))
     "These are the SSL/TLS-related settings.  Most of them are disabled so to
use Prosody's defaults.  If you do not completely understand these options, do
not add them to your config, it is easy to lower the security of your server
using them.  See @url{http://prosody.im/doc/advanced_ssl_config}."
     common)

    (c2s-require-encryption?
     (boolean #f)
     "Whether to force all client-to-server connections to be encrypted or not.
See @url{http://prosody.im/doc/modules/mod_tls}."
     common)

    (s2s-require-encryption?
     (boolean #f)
     "Whether to force all server-to-server connections to be encrypted or not.
See @url{http://prosody.im/doc/modules/mod_tls}."
     common)

    (s2s-secure-auth?
     (boolean #f)
     "Whether to require encryption and certificate authentication.  This
provides ideal security, but requires servers you communicate with to support
encryption AND present valid, trusted certificates.  See
@url{http://prosody.im/doc/s2s#security}."
     common)

    (s2s-insecure-domains
     (string-list '())
     "Many servers don't support encryption or have invalid or self-signed
certificates.  You can list domains here that will not be required to
authenticate using certificates.  They will be authenticated using DNS.  See
@url{http://prosody.im/doc/s2s#security}."
     common)

    (s2s-secure-domains
     (string-list '())
     "Even if you leave @code{s2s-secure-auth?} disabled, you can still require
valid certificates for some domains by specifying a list here.  See
@url{http://prosody.im/doc/s2s#security}."
     common)

    (authentication
     (string "internal_plain")
     "Select the authentication backend to use.  The default provider stores
passwords in plaintext and uses Prosody's configured data storage to store the
authentication data.  If you do not trust your server please see
@url{http://prosody.im/doc/modules/mod_auth_internal_hashed} for information
about using the hashed backend.  See also
@url{http://prosody.im/doc/authentication}"
     common)

    ;; TODO: Handle more complicated log structures.
    (log
     (maybe-string "*syslog")
     "Set logging options.  Advanced logging configuration is not yet supported
by the GuixSD Prosody Service.  See @url{http://prosody.im/doc/logging}."
     common)

    (pidfile
     (file-name "/var/run/prosody/prosody.pid")
     "File to write pid in.  See @url{http://prosody.im/doc/modules/mod_posix}."
     global)

    (virtualhosts
     (virtualhost-configuration-list
      (list (virtualhost-configuration
             (domain "localhost"))))
     "A host in Prosody is a domain on which user accounts can be created.  For
example if you want your users to have addresses like
@samp{\"john.smith@@example.com\"} then you need to add a host
@samp{\"example.com\"}.  All options in this list will apply only to this host.

Note: the name \"virtual\" host is used in configuration to avoid confusion with
the actual physical host that Prosody is installed on.  A single Prosody
instance can serve many domains, each one defined as a VirtualHost entry in
Prosody's configuration.  Conversely a server that hosts a single domain would
have just one VirtualHost entry.

See @url{http://prosody.im/doc/configure#virtual_host_settings}."
     global)

    (int-components
     (int-component-configuration-list '())
     "Components are extra services on a server which are available to clients,
usually on a subdomain of the main server (such as
@samp{\"mycomponent.example.com\"}).  Example components might be chatroom
servers, user directories, or gateways to other protocols.

Internal components are implemented with Prosody-specific plugins.  To add an
internal component, you simply fill the hostname field, and the plugin you wish
to use for the component.

See @url{http://prosody.im/doc/components}."
     global)

    (ext-components
     (ext-component-configuration-list '())
     "External components use XEP-0114, which most standalone components
support.  To add an external component, you simply fill the hostname field.  See
@url{http://prosody.im/doc/components}."
     global)

    (component-secret
     (string (configuration-missing-field 'ext-component 'component-secret))
     "Password which the component will use to log in."
     ext-component)

    (component-ports
     (non-negative-integer-list '(5347))
     "Port(s) Prosody listens on for component connections."
     global)

    (component-interface
     (string "127.0.0.1")
     "Interface Prosody listens on for component connections."
     global)

    (domain
     (string (configuration-missing-field 'virtualhost 'domain))
     "Domain you wish Prosody to serve."
     virtualhost)

    (hostname
     (string (configuration-missing-field 'int-component 'hostname))
     "Hostname of the component."
     int-component)

    (plugin
     (string (configuration-missing-field 'int-component 'plugin))
     "Plugin you wish to use for the component."
     int-component)

    (mod-muc
     (maybe-mod-muc-configuration 'disabled)
     "Multi-user chat (MUC) is Prosody's module for allowing you to create
hosted chatrooms/conferences for XMPP users.

General information on setting up and using multi-user chatrooms can be found
in the \"Chatrooms\" documentation (@url{http://prosody.im/doc/chatrooms}),
which you should read if you are new to XMPP chatrooms.

See also @url{http://prosody.im/doc/modules/mod_muc}."
     int-component)

    (hostname
     (string (configuration-missing-field 'ext-component 'hostname))
     "Hostname of the component."
     ext-component)))

;; Serialize Virtualhost line first.
(define (serialize-virtualhost-configuration config)
  (define (rest? field)
    (not (memq (configuration-field-name field)
               '(domain))))
  (let ((domain (virtualhost-configuration-domain config))
        (rest (filter rest? virtualhost-configuration-fields)))
    (format #t "VirtualHost \"~a\"\n" domain)
    (serialize-configuration config rest)))

;; Serialize Component line first.
(define (serialize-int-component-configuration config)
  (define (rest? field)
    (not (memq (configuration-field-name field)
               '(hostname plugin))))
  (let ((hostname (int-component-configuration-hostname config))
        (plugin (int-component-configuration-plugin config))
        (rest (filter rest? int-component-configuration-fields)))
    (format #t "Component \"~a\" \"~a\"\n" hostname plugin)
    (serialize-configuration config rest)))

;; Serialize Component line first.
(define (serialize-ext-component-configuration config)
  (define (rest? field)
    (not (memq (configuration-field-name field)
               '(hostname))))
  (let ((hostname (ext-component-configuration-hostname config))
        (rest (filter rest? ext-component-configuration-fields)))
    (format #t "Component \"~a\"\n" hostname)
    (serialize-configuration config rest)))

;; Serialize virtualhosts and components last.
(define (serialize-prosody-configuration config)
  (define (rest? field)
    (not (memq (configuration-field-name field)
               '(virtualhosts int-components ext-components))))
  (let ((rest (filter rest? prosody-configuration-fields)))
    (serialize-configuration config rest))
  (serialize-virtualhost-configuration-list
   (prosody-configuration-virtualhosts config))
  (serialize-int-component-configuration-list
   (prosody-configuration-int-components config))
  (serialize-ext-component-configuration-list
   (prosody-configuration-ext-components config)))

(define-configuration opaque-prosody-configuration
  (prosody
   (package prosody)
   "The prosody package.")

  (prosody.cfg.lua
   (string (configuration-missing-field 'opaque-prosody-configuration
                                        'prosody.cfg.lua))
   "The contents of the @code{prosody.cfg.lua} to use."))

(define (prosody-shepherd-service config)
  "Return a <shepherd-service> for Prosody with CONFIG."
  (let* ((prosody (if (opaque-prosody-configuration? config)
                      (opaque-prosody-configuration-prosody config)
                      (prosody-configuration-prosody config)))
         (prosodyctl-bin (file-append prosody "/bin/prosodyctl"))
         (prosodyctl-action (lambda args
                              #~(lambda _
                                  (zero? (system* #$prosodyctl-bin #$@args))))))
    (list (shepherd-service
           (documentation "Run the Prosody XMPP server")
           (provision '(prosody))
           (requirement '(networking syslogd user-processes))
           (start (prosodyctl-action "start"))
           (stop (prosodyctl-action "stop"))))))

(define %prosody-accounts
  (list (user-group (name "prosody") (system? #t))
        (user-account
         (name "prosody")
         (group "prosody")
         (system? #t)
         (comment "Prosody daemon user")
         (home-directory "/var/empty")
         (shell (file-append shadow "/sbin/nologin")))))

(define (prosody-activation config)
  "Return the activation gexp for CONFIG."
  (let* ((config-dir "/etc/prosody")
         (default-certs-dir "/etc/prosody/certs")
         (data-path (prosody-configuration-data-path config))
         (pidfile-dir (dirname (prosody-configuration-pidfile config)))
         (config-str
          (if (opaque-prosody-configuration? config)
              (opaque-prosody-configuration-prosody.cfg.lua config)
              (with-output-to-string
                (lambda ()
                  (serialize-prosody-configuration config)))))
         (config-file (plain-file "prosody.cfg.lua" config-str)))
    #~(begin
        (use-modules (guix build utils))
        (define %user (getpw "prosody"))

        (mkdir-p #$config-dir)
        (chown #$config-dir (passwd:uid %user) (passwd:gid %user))
        (copy-file #$config-file (string-append #$config-dir
                                                "/prosody.cfg.lua"))

        (mkdir-p #$default-certs-dir)
        (chown #$default-certs-dir (passwd:uid %user) (passwd:gid %user))
        (chmod #$default-certs-dir #o750)

        (mkdir-p #$data-path)
        (chown #$data-path (passwd:uid %user) (passwd:gid %user))
        (chmod #$data-path #o750)

        (mkdir-p #$pidfile-dir)
        (chown #$pidfile-dir (passwd:uid %user) (passwd:gid %user)))))

(define prosody-service-type
  (service-type (name 'prosody)
                (extensions
                 (list (service-extension shepherd-root-service-type
                                          prosody-shepherd-service)
                       (service-extension account-service-type
                                          (const %prosody-accounts))
                       (service-extension activation-service-type
                                          prosody-activation)))))

;; A little helper to make it easier to document all those fields.
(define (generate-documentation)
  (define documentation
    `((prosody-configuration
       ,prosody-configuration-fields
       (ssl ssl-configuration)
       (virtualhosts virtualhost-configuration)
       (int-components int-component-configuration)
       (ext-components ext-component-configuration))
      (ssl-configuration ,ssl-configuration-fields)
      (int-component-configuration ,int-component-configuration-fields
                                   (mod-muc mod-muc-configuration))
      (ext-component-configuration ,ext-component-configuration-fields)
      (mod-muc-configuration ,mod-muc-configuration-fields)
      (virtualhost-configuration ,virtualhost-configuration-fields)
      (opaque-prosody-configuration ,opaque-prosody-configuration-fields)))
  (define (generate configuration-name)
    (match (assq-ref documentation configuration-name)
      ((fields . sub-documentation)
       (format #t "\nAvailable @code{~a} fields are:\n\n" configuration-name)
       (when (memq configuration-name
                   '(virtualhost-configuration
                     int-component-configuration
                     ext-component-configuration))
         (format #t "all these @code{prosody-configuration} fields: ~a, plus:\n"
                 (string-join (map (lambda (s)
                                     (format #f "@code{~a}" s)) common-fields)
                              ", ")))
       (for-each
        (lambda (f)
          (let ((field-name (configuration-field-name f))
                (field-type (configuration-field-type f))
                (field-docs (string-trim-both
                             (configuration-field-documentation f)))
                (default (catch #t
                           (configuration-field-default-value-thunk f)
                           (lambda _ 'nope))))
            (define (escape-chars str chars escape)
              (with-output-to-string
                (lambda ()
                  (string-for-each (lambda (c)
                                     (when (char-set-contains? chars c)
                                       (display escape))
                                     (display c))
                                   str))))
            (define (show-default? val)
              (or (string? default) (number? default) (boolean? default)
                  (and (list? val) (and-map show-default? val))))
            (format #t "@deftypevr {@code{~a} parameter} ~a ~a\n~a\n"
                    configuration-name field-type field-name field-docs)
            (when (show-default? default)
              (format #t "Defaults to @samp{~a}.\n"
                      (escape-chars (format #f "~s" default)
                                    (char-set #\@ #\{ #\})
                                    #\@)))
            (for-each generate (or (assq-ref sub-documentation field-name) '()))
            (format #t "@end deftypevr\n\n")))
        (filter (lambda (f)
                  (not (string=? "" (configuration-field-documentation f))))
                fields)))))
  (generate 'prosody-configuration)
  (format #t "It could be that you just want to get a @code{prosody.cfg.lua}
up and running.  In that case, you can pass an
@code{opaque-prosody-configuration} record as the value of
@code{prosody-service-type}.  As its name indicates, an opaque configuration
does not have easy reflective capabilities.")
  (generate 'opaque-prosody-configuration)
  (format #t "For example, if your @code{prosody.cfg.lua} is just the empty
string, you could instantiate a prosody service like this:

@example
(service prosody-service-type
         (opaque-prosody-configuration
          (prosody.cfg.lua \"\")))
@end example"))
ar.bz2")) (sha256 (base32 "1w445v3911cf7l6w5c0f84aphv8s579f8srnhjrhf3drd07xsy8d")))) (build-system gnu-build-system) (native-inputs (list pkg-config intltool)) (inputs (list libxrandr gtk+ upower libnotify libxfce4ui)) (home-page "https://www.xfce.org/") (synopsis "Xfce Power Manager") (description "This is a power manager for the Xfce desktop. It manages the power sources on the computer and the devices that can be controlled to reduce their power consumption (such as LCD brightness level, monitor sleep, CPU frequency scaling, etc). In addition, xfce4-power-manager provides a set of freedesktop-compliant DBus interfaces to inform other applications about current power level so that they can adjust their power consumption, and it provides the inhibit interface which allows applications to prevent automatic sleep.") (license gpl2+))) (define-public ristretto (package (name "ristretto") (version "0.13.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/ristretto/" (version-major+minor version) "/" "ristretto-" version ".tar.bz2")) (sha256 (base32 "1nbxfm6ljcw45vn8hhjxwcv3k387hdah4jnn07n9w08n63g5x7vp")))) (build-system gnu-build-system) (native-inputs (list intltool desktop-file-utils `(,glib "bin") ; for gdbus-codegen pkg-config)) (inputs (list gtk+ libexif libxfce4ui tumbler)) (home-page "https://docs.xfce.org/apps/ristretto/start") (synopsis "Fast and lightweight picture-viewer") (description "The Ristretto Image Viewer is an application that can be used to view, and scroll through images. It can be used to run a slideshow of images, open images with other applications like an image-editor or configure an image as the desktop wallpaper.") (license gpl2+))) (define-public xfce4-taskmanager (package (name "xfce4-taskmanager") (version "1.5.7") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/" "xfce4-taskmanager/" (version-major+minor version) "/" "xfce4-taskmanager-" version ".tar.bz2")) (sha256 (base32 "1fv83xcbnlwabi32z3fsdik1knh7v45ji529dx9kwlv4b8pq6dk7")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libwnck libxmu gtk+ libxfce4ui ;; FIXME: Remove libxext and libxt when libxmu propagates them. libxext libxt)) (home-page "https://goodies.xfce.org/projects/applications/xfce4-taskmanager") (synopsis "Easy to use task manager") (description "This is a task manager for the Xfce desktop. It displays the CPU and memory usage graphically, and it can display processes as a tree.") (license gpl2+))) (define-public orage (package (name "orage") (version "4.18.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/" name "/" (version-major+minor version) "/" name "-" version ".tar.bz2")) (sha256 (base32 "1v5385hps6jgcw1ky9vl7w7iryp0rzxz6s4lx72rz8yg4sdv84v3")))) (build-system gnu-build-system) (native-inputs (list `(,glib "bin") ; for dbus-binding-tool intltool pkg-config)) (inputs (list dbus-glib gtk+-2 libical libnotify libxfce4ui popt xfce4-panel)) (home-page "https://www.xfce.org/projects/") (synopsis "Simple calendar application with reminders") (description "This is a simple calendar application for the Xfce desktop. Orage has alarms and uses the iCalendar format, making it compatible with many other calendar applications. It also includes a panel clock plugin and an international clock application capable of simultaneously showing clocks from several different time zones.") (license gpl2+))) (define-public xfce4-notifyd (package (name "xfce4-notifyd") (version "0.9.4") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/" name "/" (version-major+minor version) "/" name "-" version ".tar.bz2")) (sha256 (base32 "063qxbcy8djijsb0clzkai3mwg43mmlswwrg403vsi2w0n614v5f")))) (build-system glib-or-gtk-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'configure 'patch-configure (lambda _ (substitute* "configure" (("\\$PKG_CONFIG --variable=gdbus_codegen gio-2.0") "which gdbus-codegen") (("\\$PKG_CONFIG --variable=glib_compile_resources gio-2.0") "which glib-compile-resources") (("\\$PKG_CONFIG --variable=glib_genmarshal glib-2.0") "which glib-genmarshal") (("\\$PKG_CONFIG --variable=glib_mkenums glib-2.0") "which glib-mkenums"))))))) (native-inputs (list intltool pkg-config (list glib "bin") which)) (inputs (list libxfce4ui libnotify sqlite xfce4-panel)) (home-page "https://goodies.xfce.org/projects/applications/xfce4-notifyd") (synopsis "Show notification bubbles on Xfce") (description "The Xfce Notify Daemon (xfce4-notifyd for short) is a smallish program that implements the “server-side” portion of the Freedesktop desktop notifications specification. Applications that wish to pop up a notification bubble in a standard way can implicitly make use of xfce4-notifyd to do so by sending standard messages over D-Bus using the @code{org.freedesktop.Notifications} interface.") (license gpl2))) (define-public xfburn (package (name "xfburn") (version "0.7.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/xfburn/" (version-major+minor version) "/" "xfburn-" version ".tar.bz2")) (sha256 (base32 "0i8zpgp4mj78pn2023pdhzb7552r3b52phzp2gjr6jq4kakhx5ms")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list exo gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly glib gtk+ libburn libisofs libxfce4ui)) (home-page "https://goodies.xfce.org/projects/applications/xfburn") (synopsis "GTK+ based CD, DVD and Blu-ray burning application") (description "Xfburn is a simple CD, DVD, and Blu-ray burning tool based on the libburnia libraries. It can blank CD/DVD/BD(-RW)s, burn and create iso images, audio CDs, as well as burn personal compositions of data to either CD/DVD/BD.") (license gpl2+))) (define-public mousepad (package (name "mousepad") (version "0.6.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/mousepad/" (version-major+minor version) "/mousepad-" version ".tar.bz2")) (sha256 (base32 "17fi33mkdz1nfmsgqlfa20l06wwy0s8lcj21cfg6ikdiihxwpjp7")))) (build-system gnu-build-system) (arguments '(#:configure-flags '(;; Use the GSettings keyfile backend rather than ;; DConf. "--enable-keyfile-settings") #:phases (modify-phases %standard-phases (add-after 'install 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (gtksourceview (assoc-ref inputs "gtksourceview"))) (wrap-program (string-append out "/bin/mousepad") ;; For language-specs. `("XDG_DATA_DIRS" ":" prefix (,(string-append gtksourceview "/share")))))))))) (native-inputs (list intltool `(,glib "bin") ; for glib-compile-schemas. pkg-config)) (inputs (list bash-minimal gtk+ gtksourceview-4 xfconf)) (home-page "https://git.xfce.org/apps/mousepad/") (synopsis "Simple text editor for Xfce") (description "Mousepad is a graphical text editor for Xfce based on Leafpad.") (license gpl2+))) (define-public xfce4-screenshooter (package (name "xfce4-screenshooter") (version "1.10.5") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/" "xfce4-screenshooter/" (version-major+minor version) "/xfce4-screenshooter-" version ".tar.bz2")) (sha256 (base32 "0732f1v6s1zkflq47rgdsimq73k7q94gwag1y9sza5smd8m1ywgs")))) (build-system gnu-build-system) (native-inputs (list pkg-config intltool `(,glib "bin"))) ; glib-genmarshal (inputs (list exo libsoup-minimal-2 libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/applications/xfce4-screenshooter") (synopsis "Xfce's application to take screenshots") (description "This application allows you to capture the entire screen, the active window or a selected region. You can set the delay that elapses before the screenshot is taken and the action that will be done with the screenshot. A plugin for the Xfce panel is also available.") (license gpl2+))) (define-public xfce4-screensaver (package (name "xfce4-screensaver") (version "4.18.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/" "xfce4-screensaver/" (version-major+minor version) "/xfce4-screensaver-" version ".tar.bz2")) (sha256 (base32 "0f9sw703pcgz47689qgc550h2hpqlzvsfgggd7z9s6516rhk2wfi")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'fix-dbus-1-path (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (dbus-dir (string-append out "/share/dbus-1/services"))) (substitute* "configure" (("DBUS_SESSION_SERVICE_DIR=.*") (string-append "DBUS_SESSION_SERVICE_DIR=" dbus-dir))))))))) (native-inputs (list pkg-config intltool glib ; glib-compile-schemas `(,glib "bin"))) ; glib-compile-schemas (inputs (list dbus-glib linux-pam elogind garcon libxklavier libwnck libxscrnsaver xfconf)) (home-page "https://docs.xfce.org/apps/screensaver/start") (synopsis "Screensaver for the Xfce desktop") (description "Xfce Screensaver is a screen saver and locker that aims to have simple, sane, secure defaults and be well integrated with the Xfce desktop.") (license gpl2+))) (define-public xfce4-volumed-pulse (package (name "xfce4-volumed-pulse") (version "0.2.4") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/apps/" name "/" (version-major+minor version) "/" name "-" version ".tar.bz2")) (sha256 (base32 "0ql3hlciffjs981jp21hg6phrk25crh64yc01fm0l75k4vvf66d0")))) (build-system glib-or-gtk-build-system) (native-inputs (list intltool pkg-config)) (inputs (list xfconf libnotify pulseaudio keybinder-3.0 gtk+)) (home-page "https://goodies.xfce.org/projects/applications/xfce4-volumed") (synopsis "XFCE volume keys daemon") (description "This is a volume keys control daemon for Xfce Desktop environment. It controls the volume using multimedia keys. It also provides volume change notifications.") (license gpl3+))) (define-public xfce4-cpugraph-plugin (package (name "xfce4-cpugraph-plugin") (version "1.2.10") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-cpugraph-plugin/" (version-major+minor version) "/xfce4-cpugraph-plugin-" version ".tar.bz2")) (sha256 (base32 "05frfn3y009xndks9rsw90jgk0v5zfarn5jqaqci45v9ab82sy9p")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-cpugraph-plugin") (synopsis "Display CPU load as a graph in the Xfce panel") (description "This panel plugin offers multiple display modes (LED, gradient, fire, etc…) to show the current CPU load of the system. Various appearance options, like colors or size, are customizable. On multi core or multi CPU systems, CPU Graph can either track and display all of them at once, or at the user's option only a specific core or CPU.") (license gpl2+))) (define-public xfce4-eyes-plugin (package (name "xfce4-eyes-plugin") (version "4.6.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-eyes-plugin/" (version-major+minor version) "/xfce4-eyes-plugin-" version ".tar.bz2")) (sha256 (base32 "092kmv2i0flg3zg622q0id70mz1kvlz27y12i5y3nfdsi1fz03xd")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-eyes-plugin") (synopsis "Display a pair of eyes for the Xfce panel") (description "Eyes is a toy Xfce panel plugin that adds eyes which watch your every step.") (license gpl2+))) (define-public xfce4-datetime-plugin (package (name "xfce4-datetime-plugin") (version "0.8.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-datetime-plugin/" (version-major+minor version) "/xfce4-datetime-plugin-" version ".tar.bz2")) (sha256 (base32 "1c00rj3h25g0g3ss5n07hp2ziis3rnjd5jr6firnhs2qzdwynbkb")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-datetime-plugin") (synopsis "Display date and time inside the Xfce panel") (description "This plugin shows the date and time in the panel, and a calendar appears when you left-click on it.") (license gpl2+))) (define-public xfce4-calculator-plugin (package (name "xfce4-calculator-plugin") (version "0.7.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-calculator-plugin/" (version-major+minor version) "/xfce4-calculator-plugin-" version ".tar.bz2")) (sha256 (base32 "12q2jh67w0m9vq94gf324xg9k3mji943rwgrddlc340sljz25xni")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-calculator-plugin") (synopsis "Calculator for the Xfce panel") (description "This plugin is a calculator for the Xfce4 panel. It supports common mathematical operators (+, -, *, /, ^) with usual precedence rules, and the following functions and common constants.") (license gpl2+))) (define-public xfce4-cpufreq-plugin (package (name "xfce4-cpufreq-plugin") (version "1.2.8") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-cpufreq-plugin/" (version-major+minor version) "/xfce4-cpufreq-plugin-" version ".tar.bz2")) (sha256 (base32 "1sbkjphrlyyqsmdggq2624qr45wkkrmvczpv04h5fpkjykcmir07")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-cpufreq-plugin") (synopsis "Xfce panel plugin for displaying CPU frequency") (description "This panel plugin shows information about the CPU governor and frequencies supported and used by your system.") (license gpl2+))) (define-public xfce4-diskperf-plugin (package (name "xfce4-diskperf-plugin") (version "2.7.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-diskperf-plugin/" (version-major+minor version) "/xfce4-diskperf-plugin-" version ".tar.bz2")) (sha256 (base32 "1jgcdwiaqs06l729vbj3kgv67iwimjp8gfy7ydzlvbx6859sc2ar")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-diskperf-plugin") (synopsis "Display disk performance in the Xfce panel") (description "This Xfce panel plugin displays instant disk/partition performance (bytes transferred per second).") (license gpl2+))) (define-public xfce4-fsguard-plugin (package (name "xfce4-fsguard-plugin") (version "1.1.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-fsguard-plugin/" (version-major+minor version) "/xfce4-fsguard-plugin-" version ".tar.bz2")) (sha256 (base32 "0n62dsc25ynv8kk5va50py88fi0lgggvl0gi1r6dd4i2fns8pvw4")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-fsguard-plugin") (synopsis "Xfce panel plugin to monitor free disk space") (description "The panel plugin checks free space on a chosen mount point frequently and displays a message when a limit is reached. There are two limits: a warning limit where only the icon changes, and an urgent limit that advise the user with a message. The icon button can be clicked to open the chosen mount point.") (license bsd-2))) (define-public xfce4-genmon-plugin (package (name "xfce4-genmon-plugin") (version "4.2.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-genmon-plugin/" (version-major+minor version) "/xfce4-genmon-plugin-" version ".tar.bz2")) (sha256 (base32 "0qh3b818kbf5sc07dshkd54nhqncsk0inlwv21zq8h11bzp0i3cl")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin") (synopsis "Generic program output monitor for the Xfce panel") (description "This plugin cyclically spawns the indicated script/program, captures its output (stdout) and displays the resulting string into the panel. The string can also contain markup to displayed an image, a bar, a button and a personalized tooltip.") (license gpl2+))) (define-public xfce4-mailwatch-plugin (package (name "xfce4-mailwatch-plugin") (version "1.3.1") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-mailwatch-plugin/" (version-major+minor version) "/xfce4-mailwatch-plugin-" version ".tar.bz2")) (sha256 (base32 "0sh402c7v3sa9nqz8dd2gfn7ml01xbhir680ci46i9jczvln8j85")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list gtk+-2 libxfce4ui exo xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-mailwatch-plugin") (synopsis "Mail watch plugin for the Xfce panel") (description "The Xfce4 Mailwatch Plugin is a multi-protocol, multi-mailbox mail watcher. Currently, the protocols supported are: @itemize @item IMAP (SSL/TLS and cleartext, CRAM-MD5) @item POP3 (SSL/TLS and cleartext, CRAM-MD5) @item Mbox mail spool (local) @item Maildir mail spool (local) @item MH-Maildir mail spool (local) @item Google Mail (GMail) mailbox (remote) (requires gnutls) @end itemize") (license gpl2))) (define-public xfce4-mpc-plugin (package (name "xfce4-mpc-plugin") (version "0.5.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-mpc-plugin/" (version-major+minor version) "/xfce4-mpc-plugin-" version ".tar.bz2")) (sha256 (base32 "0kb6nz3md3cacl7ys6gz4h2qailr050wp28b7qy2v66d396znrq4")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-mpc-plugin") (synopsis "Music Player Daemon plugin for the Xfce panel") (description "This is a simple client plugin for Music Player Daemon. Features: @itemize @item send Play/Stop/Next/Previous command to MPD. @item uses media icons names from icon-naming-spec (at least nuvola, tango and rodent themes provides these icons) @item decrease/increase volume using the mouse wheel. @item show the current volume, status and title as a tooltip when hovering the mouse over the plugin. @item show a simple playlist window upon middle-click, permitting to select a track to play @item configurable MPD host/port/password. @item toggles repeat/random features + enable/disable MPD outputs in the right-click menu. @item launch configurable client (gmpc, xterm -e ncmpc,..) through right-click menu @item configurable markup for tooltip and playlist, using a gmpc-like markup @end itemize") (license isc))) (define-public xfce4-mount-plugin (package (name "xfce4-mount-plugin") (version "1.1.6") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-mount-plugin/" (version-major+minor version) "/xfce4-mount-plugin-" version ".tar.bz2")) (sha256 (base32 "0ca8j2smq20zydj0gbb20fkcisgzcswpnpz5h8laxb3ghr03frlg")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-mount-plugin") (synopsis "Mount/unmount plugin for the Xfce panel") (description "The plugin will display a list of items representing your various devices. If you click on an unmounted devices it will mount it and vice versa. There is a warning in case a device can't be mounted or when unmounting fails.") (license gpl2+))) (define-public xfce4-netload-plugin (package (name "xfce4-netload-plugin") (version "1.4.1") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-netload-plugin/" (version-major+minor version) "/xfce4-netload-plugin-" version ".tar.bz2")) (sha256 (base32 "0kmlrh29gn6yby8l1lgxp4211pjn3mrd2z0jzd5mh61fslx3mb4z")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-netload-plugin") (synopsis "Netload plugin for the Xfce Panel") (description "This plugin displays the current load of the network interfaces of your choice in the panel.") (license gpl2+))) (define-public xfce4-places-plugin (package (name "xfce4-places-plugin") (version "1.8.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-places-plugin/" (version-major+minor version) "/xfce4-places-plugin-" version ".tar.bz2")) (sha256 (base32 "0hy7c350x1p1grj517l1x0r8b4asbcv7sl3b5qnb0apj0dnhw7gi")))) (build-system gnu-build-system) (native-inputs (list intltool desktop-file-utils pkg-config)) (inputs (list gtk+-2 exo libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-places-plugin") (synopsis "Gnome-like Places menu for the Xfce panel") (description "This plugin provides a menu with quick access to folders, documents, and removable media. The places plugin brings much of the functionality of GNOME's Places menu to Xfce. The plugin puts a simple button on the panel. Clicking on this button opens up a menu with the following: @itemize @item System-defined directories (home folder, trash, desktop, file system) @item Removable media (using thunar-vfs) @item User-defined bookmarks (reads @file{~/.gtk-bookmarks}) @item Search program launcher (optional) @item Recent documents submenu @end itemize") (license gpl2+))) (define-public xfce4-smartbookmark-plugin (package (name "xfce4-smartbookmark-plugin") (version "0.5.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-smartbookmark-plugin/" (version-major+minor version) "/xfce4-smartbookmark-plugin-" version ".tar.bz2")) (sha256 (base32 "1lyd64qc9w6qnpqjb5xk0mjq4l7riv6z7l9aws28clalb8prw9ra")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-smartbookmark-plugin") (synopsis "Perform custom searches in your browser from the Xfce panel") (description "This plugin allows you to send search requests directly to your browser, such that you can search through your favorite search engine or bug tracker right from the Xfce panel.") (license gpl2+))) (define-public xfce4-statusnotifier-plugin (package (name "xfce4-statusnotifier-plugin") (version "0.2.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-statusnotifier-plugin/" (version-major+minor version) "/xfce4-statusnotifier-plugin-" version ".tar.bz2")) (sha256 (base32 "1d2n56g12dhnjznrq7xvr6d3brpp0lmm080xmgjb7ybc1yygpxrc")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config `(,glib "bin"))) (inputs (list libxfce4ui libdbusmenu xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-statusnotifier-plugin") (synopsis "Xfce panel plugin for status notifier items") (description "This plugin provides a panel area for status notifier items (application indicators). Applications may use these items to display their status and interact with the user. This technology is a modern alternative to systray and follows the freedesktop.org specification.") (license gpl2+))) (define-public xfce4-stopwatch-plugin (package (name "xfce4-stopwatch-plugin") (version "0.5.0") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-stopwatch-plugin/" (version-major+minor version) "/xfce4-stopwatch-plugin-" version ".tar.bz2")) (sha256 (base32 "1q840298jzdqlhc9lw49q32xzdhnbzcgvv69qq5slkc704s5w6vw")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-stopwatch-plugin") (synopsis "Stopwatch plugin for the Xfce panel") (description "This Xfce panel plugin keeps track of elapsed time.") (license bsd-2))) (define-public xfce4-systemload-plugin (package (name "xfce4-systemload-plugin") (version "1.3.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-systemload-plugin/" (version-major+minor version) "/xfce4-systemload-plugin-" version ".tar.bz2")) (sha256 (base32 "0wmh09w5fnm9srbr6r4gpdima738szqcp3qbzb8kl18f0b1kyc5v")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libgtop libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-systemload-plugin") (synopsis "System load display plugin for the Xfce panel") (description "A system load plugin for the Xfce4 desktop environment. It displays the current CPU load, the memory in use, the swap space and the system uptime in the Xfce4 panel.") (license bsd-2))) (define-public xfce4-time-out-plugin (package (name "xfce4-time-out-plugin") (version "1.1.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-time-out-plugin/" (version-major+minor version) "/xfce4-time-out-plugin-" version ".tar.bz2")) (sha256 (base32 "1s4f4akj45bjhqhnfb8wim2snw52wrdym1yqpcccfpp9c5is672s")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list gtk+ libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-time-out-plugin") (synopsis "Xfce panel plugin that encourages periodical breaks") (description "This plugin encourages to take periodical breaks from the computer every X minutes. During breaks it locks your screen. It optionally allows you to postpone breaks for a certain time.") (license gpl2+))) (define-public xfce4-timer-plugin (package (name "xfce4-timer-plugin") (version "1.7.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-timer-plugin/" (version-major+minor version) "/xfce4-timer-plugin-" version ".tar.bz2")) (sha256 (base32 "0zcbqpsyzzmbyv8cgd5wriqaigfpdcia6h1md0bfh1cmsg1biczy")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-timer-plugin") (synopsis "Simple countdown and alarm plugin for the Xfce panel") (description "This is a simple plugin that lets the user run an alarm at a specified time or at the end of a specified countdown period.") (license gpl2+))) (define-public xfce4-verve-plugin (package (name "xfce4-verve-plugin") (version "2.0.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-verve-plugin/" (version-major+minor version) "/xfce4-verve-plugin-" version ".tar.bz2")) (sha256 (base32 "17p0kxnzx4ks3rs281x5pvwksl1gh2mg7h7mkccjmkzr3cgi5gz1")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui pcre2 xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-verve-plugin") (synopsis "Command line for the Xfce panel") (description "The Verve plugin provides a comfortable command line for the Xfce panel. It supports several features, such as: @itemize @item Opens URLs, e-mail addresses, directories, and programs @item Command history @item Auto-completion (including command history) @item Focus grabbing via D-BUS (so you can bind a shortcut to it) @item Custom input field width @end itemize") (license gpl2+))) (define-public xfce4-wavelan-plugin (package (name "xfce4-wavelan-plugin") (version "0.6.3") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-wavelan-plugin/" (version-major+minor version) "/xfce4-wavelan-plugin-" version ".tar.bz2")) (sha256 (base32 "0azpv0s3r4ag3gp0bsfvq0jgzycx6ivdsw5p0ga7425pdksw5h31")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list libxfce4ui xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-wavelan-plugin") (synopsis "Show stats from WLAN interface in Xfce panel") (description "This plugin is used to display stats from a wireless lan interface (signal state, signal quality, network name (SSID)).") (license bsd-2))) (define-public xfce4-weather-plugin (package (name "xfce4-weather-plugin") (version "0.11.2") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/panel-plugins/" "xfce4-weather-plugin/" (version-major+minor version) "/xfce4-weather-plugin-" version ".tar.bz2")) (sha256 (base32 "0sw7p8xsgyc7b5w92abigqz9mii79w2vdlprm5c0hmb3g3zhmm35")))) (build-system gnu-build-system) (native-inputs (list intltool pkg-config)) (inputs (list gtk+ json-c libsoup-minimal-2 libxfce4ui libxml2 xfce4-panel)) (home-page "https://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin") (synopsis "Show information about local weather in the Xfce panel") (description "This Xfce panel plugin shows information about your local weather in the panel, using forecast data provided by the @uref{https://met.no, Norwegian Meteorological Institute}.") (license gpl2+))) (define-public xfce4-dev-tools (package (name "xfce4-dev-tools") (version "4.18.1") (source (origin (method url-fetch) (uri (string-append "https://archive.xfce.org/src/xfce/" "xfce4-dev-tools/" (version-major+minor version) "/" "xfce4-dev-tools-" version ".tar.bz2")) (sha256 (base32 "10bnb8q7sj60ahzfwrb3av4ngr17wk1p6jsnfv0yn8l90kksnb41")))) (build-system gnu-build-system) (native-inputs (list pkg-config libxslt)) (inputs (list glib)) (home-page "https://docs.xfce.org/xfce/xfce4-dev-tools/") (synopsis "Xfce developer tools") (description "The Xfce development tools are a collection of tools and macros for Xfce developers and people that want to build Xfce from Git In addition it contains the Xfce developer's handbook.") (license gpl2+)))