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