system-configuration/modules/packages/perl.scm

perl.scm

1
;;; GNU Guix --- Functional package management for GNU
2
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
3
;;;
4
;;; This file is part of GNU Guix.
5
;;;
6
;;; GNU Guix is free software; you can redistribute it and/or modify it
7
;;; under the terms of the GNU General Public License as published by
8
;;; the Free Software Foundation; either version 3 of the License, or (at
9
;;; your option) any later version.
10
;;;
11
;;; GNU Guix is distributed in the hope that it will be useful, but
12
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
;;; GNU General Public License for more details.
15
;;;
16
;;; You should have received a copy of the GNU General Public License
17
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
18
19
(define-module (packages perl)
20
  #:use-module ((guix licenses) #:prefix license:)
21
  #:use-module (gnu packages)
22
  #:use-module (guix packages)
23
  #:use-module (guix download)
24
  #:use-module (guix utils)
25
  #:use-module (guix build-system gnu)
26
  #:use-module (guix build-system perl)
27
  #:use-module (gnu packages networking)
28
  #:use-module (gnu packages perl)
29
  #:use-module (gnu packages perl-check)
30
  #:use-module (gnu packages tls)
31
  #:use-module (gnu packages web))
32
33
(define-public perl-mail-authenticationresults
34
  (package
35
    (name "perl-mail-authenticationresults")
36
    (version "1.20180923")
37
    (source (origin
38
              (method url-fetch)
39
              (uri (string-append
40
                     "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
41
                     "Mail-AuthenticationResults-" version ".tar.gz"))
42
              (sha256
43
               (base32
44
                "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
45
    (build-system perl-build-system)
46
    (native-inputs
47
     `(("perl-test-exception" ,perl-test-exception)))
48
    (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
49
    (synopsis "Object Oriented Authentication-Results Headers")
50
    (description "Mail::AuthenticationResults parses the message header field
51
that indicates the message authentication status as per RFC7601.  This module
52
is not fully compliant with the RFC but it tries to implement most styles of
53
Authentication-Results header seen in the wild.")
54
    (license license:perl-license)))
55
56
(define-public perl-net-dns-resolver-mock
57
  (package
58
    (name "perl-net-dns-resolver-mock")
59
    (version "1.20171219")
60
    (source (origin
61
              (method url-fetch)
62
              (uri (string-append
63
                     "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
64
                     "Net-DNS-Resolver-Mock-" version ".tar.gz"))
65
              (sha256
66
               (base32
67
                "0m3rxpkv1b9121srvbqkrgzg4m8mnydiydqv34in1i1ixwrl6jn9"))))
68
    (build-system perl-build-system)
69
    (propagated-inputs
70
     `(("perl-net-dns" ,perl-net-dns)))
71
    (home-page "https://metacpan.org/release/Net-DNS-Resolver-Mock")
72
    (synopsis "Mock a DNS Resolver object for testing")
73
    (description "Net::DNS::Resolver::Mock is a a subclass of
74
@code{Net::DNS::Resolver} which parses a zonefile for it's data source.  It is
75
primarily for use in testing.")
76
    (license license:perl-license)))
77
78
(define-public perl-mail-dkim
79
  (package
80
    (name "perl-mail-dkim")
81
    (version "0.55")
82
    (source (origin
83
              (method url-fetch)
84
              (uri (string-append
85
                     "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
86
                     version
87
                     ".tar.gz"))
88
              (sha256
89
               (base32
90
                "18nsh1ff6fkns4xk3y2ixmzmadgggydj11qkzj6nlnq2hzqxsafz"))))
91
    (build-system perl-build-system)
92
    (propagated-inputs
93
     `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
94
       ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
95
       ("perl-mailtools" ,perl-mailtools)
96
       ("perl-net-dns" ,perl-net-dns)
97
       ("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
98
       ("perl-test-requiresinternet" ,perl-test-requiresinternet)
99
       ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
100
    (home-page "https://metacpan.org/release/Mail-DKIM")
101
    (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
102
    (description "Mail::DKIM is a Perl module that implements the new Domain
103
Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
104
both of which sign and verify emails using digital signatures and DNS records.
105
Mail-DKIM can be used by any Perl program that wants to provide support for
106
DKIM and/or DomainKeys.")
107
    (license license:gpl3+)))
108
109
(define-public dkimproxy
110
  (package
111
    (name "dkimproxy")
112
    (version "1.4.1")
113
    (source (origin
114
              (method url-fetch)
115
              (uri (string-append
116
                     "mirror://sourceforge/dkimproxy/dkimproxy/"
117
                     version "/dkimproxy-" version ".tar.gz"))
118
              (sha256
119
               (base32
120
                "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))))
121
    (build-system gnu-build-system)
122
    (arguments
123
     `(#:phases
124
       (modify-phases %standard-phases
125
         (add-after 'install 'make-wrapper
126
           (lambda* (#:key inputs outputs #:allow-other-keys)
127
             (let ((out (assoc-ref outputs "out")))
128
               (for-each
129
                 (lambda (prog)
130
                   (wrap-program (string-append out "/bin/" prog)
131
                     `("PERL5LIB" ":" prefix
132
                       (,(string-append (assoc-ref inputs "perl-mail-dkim")
133
                                        "/lib/perl5/site_perl")
134
                        ,(string-append (assoc-ref inputs "perl-mailtools")
135
                                        "/lib/perl5/site_perl")
136
                        ,(string-append (assoc-ref inputs "perl-crypt-openssl-rsa")
137
                                        "/lib/perl5/site_perl")
138
                        ,(string-append (assoc-ref inputs "perl-net-dns")
139
                                        "/lib/perl5/site_perl")
140
                        ,(string-append (assoc-ref inputs "perl-net-server")
141
                                        "/lib/perl5/site_perl")))))
142
                 '("dkimproxy.in" "dkimproxy.out")))
143
             #t)))))
144
    (inputs
145
     `(("perl" ,perl)
146
       ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
147
       ("perl-mailtools" ,perl-mailtools)
148
       ("perl-mail-dkim" ,perl-mail-dkim)
149
       ("perl-net-dns" ,perl-net-dns)
150
       ("perl-net-server" ,perl-net-server)))
151
    (home-page "http://dkimproxy.sourceforge.net/")
152
    (synopsis "SMTP-proxy for DKIM signing and verifying")
153
    (description "DKIMproxy is an SMTP-proxy that signs and/or verifies emails,
154
using the @code{Mail::DKIM} module.  It is designed for Postfix, but should
155
work with any mail server.  It comprises two separate proxies, an outbound
156
proxy for signing outgoing email, and an inbound proxy for verifying signatures
157
of incoming email.  With Postfix, the proxies can operate as either
158
@code{Before-Queue} or @code{After-Queue} content filters.")
159
    (license license:gpl3+)))
160