Add guile-email dependency.
[software/mumi.git] / guix.scm
1 ;;; mumi - Mediocre, uh, mail interface
2 ;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;;
4 ;;; This file is part of mumi.
5 ;;;
6 ;;; mumi 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
9 ;;; (at your option) any later version.
10 ;;;
11 ;;; mumi 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 GNU
14 ;;; General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with mumi. If not, see <http://www.gnu.org/licenses/>.
18
19 ;;; Run the following command to enter a development environment for
20 ;;; mumi:
21 ;;;
22 ;;; $ guix environment -l guix.scm
23
24 (use-modules ((guix licenses) #:prefix license:)
25 (guix packages)
26 (guix download)
27 (guix git-download)
28 (guix utils)
29 (guix build-system gnu)
30 (gnu packages)
31 (gnu packages autotools)
32 (gnu packages gettext)
33 (gnu packages guile)
34 (gnu packages gsasl)
35 (gnu packages mail)
36 (gnu packages pkg-config)
37 (gnu packages texinfo)
38 (srfi srfi-1))
39
40 (define-public mailutils-next
41 ;; This version of Mailutils supports Guile 2.2, unlike version <= 3.4.
42 (let ((commit "ce5b13e92b6e2f7af243654fe0673646f00dc3a6")
43 (revision "1"))
44 (package
45 (inherit mailutils)
46 (version (string-append (package-version mailutils)
47 "-" revision "." (string-take commit 7)))
48 (source (origin
49 (method git-fetch)
50 (uri (git-reference
51 (url "https://git.savannah.gnu.org/git/mailutils.git")
52 (commit commit)
53 (recursive? #t))) ;for Gnulib & co.
54 (sha256
55 (base32
56 "15vbj5by7qg8zmh3scr3k9pymls6ijk1s85y1skclsln172r9p33"))
57 (file-name (string-append "mailutils-" version "-checkout"))))
58 (outputs '("out" "debug"))
59 (inputs
60 `(("guile" ,guile-2.2)
61 ("gsasl" ,gsasl) ;for SMTP authentication
62 ,@(alist-delete "guile" (package-inputs mailutils))))
63 (native-inputs
64 `(("autoconf" ,autoconf-wrapper)
65 ("automake" ,automake)
66 ("libtool" ,libtool)
67 ("gettext" ,gnu-gettext)
68 ,@(package-native-inputs mailutils)))
69 (arguments
70 (substitute-keyword-arguments (package-arguments mailutils)
71 ((#:modules modules %gnu-build-system-modules)
72 `((srfi srfi-1) ,@modules))
73 ((#:configure-flags flags ''())
74 `(cons* "--disable-radius"
75
76 ;; Add "/2.2" to the installation directory.
77 (string-append "--with-guile-site-dir="
78 (assoc-ref %outputs "out")
79 "/share/guile/site/2.2")
80 ,flags))
81 ((#:phases phases)
82 `(modify-phases ,phases
83 (replace 'bootstrap
84 (lambda* (#:key inputs #:allow-other-keys)
85 (for-each patch-shebang
86 '("bootstrap" "gnulib/gnulib-tool"))
87 (substitute* "bootstrap.conf"
88 (("git submodule" all)
89 (string-append "#" all)))
90 (for-each make-file-writable (find-files "gnulib"))
91 (substitute* "configure.ac"
92 (("AM_GNU_RADIUS") ""))
93 (invoke "./bootstrap" "--no-git" "--skip-po"
94 (string-append "--gnulib-srcdir=gnulib"))
95 #t))
96 (delete 'prepare-test-suite)))
97 ((#:parallel-build? _ #f) ;due to parser.y
98 #f)
99 ((#:tests? _ #f) ;XXX
100 #f))))))
101
102 (define-public guile-debbugs-next
103 (let ((commit "6ecec8828628276b537915ca12c08ba7cf7029aa")
104 (revision "1"))
105 (package
106 (name "guile-debbugs")
107 (version (git-version "0.0.3" revision commit))
108 (source (origin
109 (method git-fetch)
110 (uri (git-reference
111 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
112 (commit commit)))
113 (file-name (git-file-name name version))
114 (sha256
115 (base32
116 "0g85157qlgj3v1ny6x1xnmry13f7s5hdcls9aj4g4axh77waaj11"))))
117 (build-system gnu-build-system)
118 (native-inputs
119 `(("pkg-config" ,pkg-config)
120 ("autoconf" ,autoconf)
121 ("automake" ,automake)
122 ("texinfo" ,texinfo)))
123 (inputs
124 `(("guile" ,guile-2.2.4)))
125 (home-page "https://www.gnu.org/software/guile-debbugs")
126 (synopsis "Guile bindings for the Debbugs bug tracker")
127 (description "This package provides a Guile library to communicate with a
128 Debbugs bug tracker's SOAP service.")
129 (license license:gpl3+))))
130
131 (define-public guile-email
132 (let ((commit "fa52eac55e5946db89621a6c583d2aa357864dee")
133 (revision "1"))
134 (package
135 (name "guile-email")
136 (version (git-version "0.1.0" revision commit))
137 (source
138 (origin
139 (method git-fetch)
140 (uri (git-reference
141 (url "https://git.systemreboot.net/guile-email")
142 (commit commit)))
143 (file-name (git-file-name name version))
144 (sha256
145 (base32
146 "1037mbz7qd9bzaqp8ysyhnl9ipd97fmj3b9jr8qfzx9179vvsj63"))))
147 (build-system gnu-build-system)
148 (native-inputs
149 `(("pkg-config" ,pkg-config)
150 ("autoconf" ,autoconf)
151 ("automake" ,automake)))
152 (inputs
153 `(("guile" ,guile-2.2.4)))
154 (home-page "https://git.systemreboot.net/guile-email")
155 (synopsis "Guile email parser")
156 (description "Guile email parser")
157 (license license:agpl3+))))
158
159 (package
160 (name "mumi")
161 (version "0.0.0")
162 (source #f)
163 (build-system gnu-build-system)
164 (inputs
165 `(("guile-debbugs" ,guile-debbugs-next)
166 ("guile-email" ,guile-email)
167 ("guile-syntax-highlight" ,guile-syntax-highlight)
168 ("mailutils" ,mailutils-next)
169 ("guile" ,guile-2.2.4)))
170 (native-inputs
171 `(("autoconf" ,autoconf)
172 ("automake" ,automake)
173 ("pkg-config" ,pkg-config)))
174 (synopsis "TODO")
175 (description "TODO")
176 (home-page "TODO")
177 (license license:gpl3+))