676dfb0eb10d121fb6f32231ff3410c9c1122fbd
[software/mumi.git] / guix.scm
1 ;;; mumi - Mediocre, uh, mail interface
2 ;;; Copyright © 2016, 2017, 2018, 2019 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 base)
33 (gnu packages glib)
34 (gnu packages guile)
35 (gnu packages guile-xyz)
36 (gnu packages mail)
37 (gnu packages pkg-config)
38 (gnu packages texinfo)
39 (srfi srfi-1))
40
41 (define-public guile-email-devel
42 (let ((commit "c85e6917ea21631857d93f58e60d910e07317131")
43 (revision "2"))
44 (package (inherit guile-email)
45 (name "guile-email")
46 (version (git-version (package-version guile-email) revision commit))
47 (source (origin
48 (method git-fetch)
49 (uri (git-reference
50 (url "https://git.systemreboot.net/guile-email")
51 (commit commit)))
52 (file-name (git-file-name name version))
53 (sha256
54 (base32
55 "1ikky01gss0m3myzqpyyngv9b636a194d53mfb1s90nljxznys5j"))))
56 (native-inputs
57 `(("pkg-config" ,pkg-config)
58 ("autoconf" ,autoconf)
59 ("automake" ,automake)
60 ("texinfo" ,texinfo))))))
61
62 (define-public guile-debbugs-devel
63 (let ((commit "fb0ae064037a38a0d526e08b4ad24c52e205edb9")
64 (revision "1"))
65 (package (inherit guile-debbugs)
66 (name "guile-debbugs")
67 (version (git-version "0.0.2" revision commit))
68 (source (origin
69 (method git-fetch)
70 (uri (git-reference
71 (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
72 (commit commit)))
73 (file-name (git-file-name name version))
74 (sha256
75 (base32
76 "195sacx2xc1mzzfljj62nfpi8mxn0rc6dabxckizjksnhb5irfwy"))))
77 (build-system gnu-build-system)
78 (native-inputs
79 `(("pkg-config" ,pkg-config)
80 ("autoconf" ,autoconf)
81 ("automake" ,automake)
82 ("texinfo" ,texinfo)))
83 (propagated-inputs
84 `(("guile-email" ,guile-email-devel)))
85 (inputs
86 `(("guile" ,guile-2.2))))))
87
88 (define-public mumimu
89 (let ((commit "ad30b5e9c85f0465aeeeac461d8c32d95775d450")
90 (revision "1"))
91 (package (inherit mu)
92 (name "mumimu")
93 (version (git-version (package-version guile-email) revision commit))
94 (source (origin
95 (method git-fetch)
96 (uri (git-reference
97 (url "https://git.elephly.net/software/mumimu.git")
98 (commit commit)))
99 (file-name (git-file-name name version))
100 (sha256
101 (base32
102 "1y8r8csvkyxncgpi469dir4n4sga4z9xdzc18qh5s8bk29qj689n"))))
103 (arguments
104 (substitute-keyword-arguments (package-arguments mu)
105 ((#:tests? anything '())
106 #f)
107 ((#:phases phases)
108 `(modify-phases ,phases
109 (replace 'patch-configure
110 (lambda _
111 (delete-file "autogen.sh")
112 (substitute* "configure.ac"
113 ;; Use latest Guile
114 (("guile-2.0") "guile-2.2"))
115 (substitute* '("guile/Makefile.am"
116 "guile/mu/Makefile.am")
117 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
118 #t))
119 (replace 'fix-ffi
120 (lambda* (#:key outputs #:allow-other-keys)
121 (substitute* "guile/mumimu.scm"
122 (("\"libguile-mu\"")
123 (format #f "\"~a/lib/libguile-mumimu\""
124 (assoc-ref outputs "out"))))
125 #t))
126 (delete 'install-emacs-autoloads)))
127 ((#:configure-flags flags)
128 '("--disable-gtk"
129 "--disable-webkit"
130 "--disable-mu4e"))))
131 (native-inputs
132 `(("pkg-config" ,pkg-config)
133 ("autoconf" ,autoconf)
134 ("automake" ,automake)
135 ("libtool" ,libtool)
136 ("glib" ,glib "bin")
137 ("tzdata" ,tzdata-for-tests)
138 ("texinfo" ,texinfo))))))
139
140 (package
141 (name "mumi")
142 (version "0.0.0")
143 (source #f)
144 (build-system gnu-build-system)
145 (inputs
146 `(("guile-debbugs" ,guile-debbugs-devel)
147 ("guile-email" ,guile-email-devel)
148 ("guile-json" ,guile-json)
149 ("guile-fibers" ,guile-fibers)
150 ("guile-syntax-highlight" ,guile-syntax-highlight)
151 ("guile" ,guile-2.2)
152 ("mumimu" ,mumimu)))
153 (native-inputs
154 `(("autoconf" ,autoconf)
155 ("automake" ,automake)
156 ("pkg-config" ,pkg-config)))
157 (synopsis "TODO")
158 (description "TODO")
159 (home-page "TODO")
160 (license license:gpl3+))