guix: Update to latest version of guile-debbugs.
[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 bison)
33 (gnu packages flex)
34 (gnu packages gettext)
35 (gnu packages guile)
36 (gnu packages gsasl)
37 (gnu packages mail)
38 (gnu packages pkg-config)
39 (gnu packages texinfo)
40 (srfi srfi-1))
41
42 (define-public mailutils-next
43 ;; This version of Mailutils supports Guile 2.2, unlike version <= 3.4.
44 (let ((commit "ce5b13e92b6e2f7af243654fe0673646f00dc3a6")
45 (revision "1"))
46 (package
47 (inherit mailutils)
48 (version (string-append (package-version mailutils)
49 "-" revision "." (string-take commit 7)))
50 (source (origin
51 (method git-fetch)
52 (uri (git-reference
53 (url "https://git.savannah.gnu.org/git/mailutils.git")
54 (commit commit)
55 (recursive? #t))) ;for Gnulib & co.
56 (sha256
57 (base32
58 "15vbj5by7qg8zmh3scr3k9pymls6ijk1s85y1skclsln172r9p33"))
59 (file-name (string-append "mailutils-" version "-checkout"))))
60 (outputs '("out" "debug"))
61 (inputs
62 `(("guile" ,guile-2.2)
63 ("gsasl" ,gsasl) ;for SMTP authentication
64 ,@(alist-delete "guile" (package-inputs mailutils))))
65 (native-inputs
66 `(("autoconf" ,autoconf-wrapper)
67 ("automake" ,automake)
68 ("bison" ,bison)
69 ("flex" ,flex)
70 ("libtool" ,libtool)
71 ("gettext" ,gnu-gettext)
72 ,@(package-native-inputs mailutils)))
73 (arguments
74 (substitute-keyword-arguments (package-arguments mailutils)
75 ((#:modules modules %gnu-build-system-modules)
76 `((srfi srfi-1) ,@modules))
77 ((#:configure-flags flags ''())
78 `(cons* "--disable-radius"
79
80 ;; Add "/2.2" to the installation directory.
81 (string-append "--with-guile-site-dir="
82 (assoc-ref %outputs "out")
83 "/share/guile/site/2.2")
84 ,flags))
85 ((#:phases phases)
86 `(modify-phases ,phases
87 (replace 'bootstrap
88 (lambda* (#:key inputs #:allow-other-keys)
89 (for-each patch-shebang
90 '("bootstrap" "gnulib/gnulib-tool"))
91 (substitute* "bootstrap.conf"
92 (("git submodule" all)
93 (string-append "#" all)))
94 (for-each make-file-writable (find-files "gnulib"))
95 (substitute* "configure.ac"
96 (("AM_GNU_RADIUS") ""))
97 (invoke "./bootstrap" "--no-git" "--skip-po"
98 (string-append "--gnulib-srcdir=gnulib"))
99 #t))
100 (delete 'prepare-test-suite)))
101 ((#:parallel-build? _ #f) ;due to parser.y
102 #f)
103 ((#:tests? _ #f) ;XXX
104 #f))))))
105
106 (define-public guile-debbugs-next
107 (let ((commit "75a331d561c8b6f8efcf16216dab961c17759efe")
108 (revision "1"))
109 (package
110 (name "guile-debbugs")
111 (version (git-version "0.0.3" revision commit))
112 (source (origin
113 (method git-fetch)
114 (uri (git-reference
115 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
116 (commit commit)))
117 (file-name (git-file-name name version))
118 (sha256
119 (base32
120 "0br3mgbw41bpc9x57jlghl0i8dz9nl63r4wzs5l47aqszf84870y"))))
121 (build-system gnu-build-system)
122 (native-inputs
123 `(("pkg-config" ,pkg-config)
124 ("autoconf" ,autoconf)
125 ("automake" ,automake)
126 ("texinfo" ,texinfo)))
127 (inputs
128 `(("guile" ,guile-2.2.4)
129 ("guile-email" ,guile-email)))
130 (home-page "https://www.gnu.org/software/guile-debbugs")
131 (synopsis "Guile bindings for the Debbugs bug tracker")
132 (description "This package provides a Guile library to communicate with a
133 Debbugs bug tracker's SOAP service.")
134 (license license:gpl3+))))
135
136 (define-public guile-email
137 (let ((commit "fa52eac55e5946db89621a6c583d2aa357864dee")
138 (revision "1"))
139 (package
140 (name "guile-email")
141 (version (git-version "0.1.0" revision commit))
142 (source
143 (origin
144 (method git-fetch)
145 (uri (git-reference
146 (url "https://git.systemreboot.net/guile-email")
147 (commit commit)))
148 (file-name (git-file-name name version))
149 (sha256
150 (base32
151 "1037mbz7qd9bzaqp8ysyhnl9ipd97fmj3b9jr8qfzx9179vvsj63"))))
152 (build-system gnu-build-system)
153 (native-inputs
154 `(("pkg-config" ,pkg-config)
155 ("autoconf" ,autoconf)
156 ("automake" ,automake)))
157 (inputs
158 `(("guile" ,guile-2.2.4)))
159 (home-page "https://git.systemreboot.net/guile-email")
160 (synopsis "Guile email parser")
161 (description "Guile email parser")
162 (license license:agpl3+))))
163
164 (package
165 (name "mumi")
166 (version "0.0.0")
167 (source #f)
168 (build-system gnu-build-system)
169 (inputs
170 `(("guile-debbugs" ,guile-debbugs-next)
171 ("guile-email" ,guile-email)
172 ("guile-syntax-highlight" ,guile-syntax-highlight)
173 ("mailutils" ,mailutils-next)
174 ("guile" ,guile-2.2.4)))
175 (native-inputs
176 `(("autoconf" ,autoconf)
177 ("automake" ,automake)
178 ("pkg-config" ,pkg-config)))
179 (synopsis "TODO")
180 (description "TODO")
181 (home-page "TODO")
182 (license license:gpl3+))