summaryrefslogtreecommitdiff
path: root/guix.scm
blob: 19aa606610903e62b1268ef394ba97a5a3ff3092 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
;;; mumi - Mediocre, uh, mail interface
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of mumi.
;;;
;;; mumi is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; mumi is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;;; General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with mumi.  If not, see <http://www.gnu.org/licenses/>.

;;; Run the following command to enter a development environment for
;;; mumi:
;;;
;;;  $ guix environment -l guix.scm

(use-modules ((guix licenses) #:prefix license:)
             (guix packages)
             (guix download)
             (guix git-download)
             (guix utils)
             (guix build-system gnu)
             (gnu packages)
             (gnu packages autotools)
             (gnu packages gettext)
             (gnu packages guile)
             (gnu packages gsasl)
             (gnu packages mail)
             (gnu packages pkg-config)
             (gnu packages texinfo)
             (srfi srfi-1))

(define-public mailutils-next
  ;; This version of Mailutils supports Guile 2.2, unlike version <= 3.4.
  (let ((commit "ce5b13e92b6e2f7af243654fe0673646f00dc3a6")
        (revision "1"))
    (package
      (inherit mailutils)
      (version (string-append (package-version mailutils)
                              "-" revision "." (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.gnu.org/git/mailutils.git")
                      (commit commit)
                      (recursive? #t)))           ;for Gnulib & co.
                (sha256
                 (base32
                  "15vbj5by7qg8zmh3scr3k9pymls6ijk1s85y1skclsln172r9p33"))
                (file-name (string-append "mailutils-" version "-checkout"))))
      (outputs '("out" "debug"))
      (inputs
       `(("guile" ,guile-2.2)
         ("gsasl" ,gsasl)                         ;for SMTP authentication
         ,@(alist-delete "guile" (package-inputs mailutils))))
      (native-inputs
       `(("autoconf" ,autoconf-wrapper)
         ("automake" ,automake)
         ("libtool" ,libtool)
         ("gettext" ,gnu-gettext)
         ,@(package-native-inputs mailutils)))
      (arguments
       (substitute-keyword-arguments (package-arguments mailutils)
         ((#:modules modules %gnu-build-system-modules)
          `((srfi srfi-1) ,@modules))
         ((#:configure-flags flags ''())
          `(cons* "--disable-radius"

                  ;; Add "/2.2" to the installation directory.
                  (string-append "--with-guile-site-dir="
                                 (assoc-ref %outputs "out")
                                 "/share/guile/site/2.2")
                  ,flags))
         ((#:phases phases)
          `(modify-phases ,phases
             (replace 'bootstrap
               (lambda* (#:key inputs #:allow-other-keys)
                 (for-each patch-shebang
                           '("bootstrap" "gnulib/gnulib-tool"))
                 (substitute* "bootstrap.conf"
                   (("git submodule" all)
                    (string-append "#" all)))
                 (for-each make-file-writable (find-files "gnulib"))
                 (substitute* "configure.ac"
                   (("AM_GNU_RADIUS") ""))
                 (invoke "./bootstrap" "--no-git" "--skip-po"
                         (string-append "--gnulib-srcdir=gnulib"))
                 #t))
             (delete 'prepare-test-suite)))
         ((#:parallel-build? _ #f)                ;due to parser.y
          #f)
         ((#:tests? _ #f)                         ;XXX
          #f))))))

(define-public guile-debbugs-next
  (let ((commit "3b3945fbfc30ed1ca146d641f509c85bfe72901a")
        (revision "1"))
    (package
      (name "guile-debbugs")
      (version (git-version "0.0.3" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://git.savannah.gnu.org/git/guile-debbugs.git")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1g5j6192mp62yvir35607pnyvvjmjz09qv7zdq3y2dx8yj5khd2g"))))
      (build-system gnu-build-system)
      (native-inputs
       `(("pkg-config" ,pkg-config)
         ("autoconf" ,autoconf)
         ("automake" ,automake)
         ("texinfo" ,texinfo)))
      (inputs
       `(("guile" ,guile-2.2.4)))
      (home-page "https://www.gnu.org/software/guile-debbugs")
      (synopsis "Guile bindings for the Debbugs bug tracker")
      (description "This package provides a Guile library to communicate with a
Debbugs bug tracker's SOAP service.")
      (license license:gpl3+))))

(package
  (name "mumi")
  (version "0.0.0")
  (source #f)
  (build-system gnu-build-system)
  (inputs
   `(("guile-debbugs" ,guile-debbugs-next)
     ("guile-syntax-highlight" ,guile-syntax-highlight)
     ("mailutils" ,mailutils-next)
     ("guile" ,guile-2.2.4)))
  (native-inputs
   `(("autoconf" ,autoconf)
     ("automake" ,automake)
     ("pkg-config" ,pkg-config)))
  (synopsis "TODO")
  (description "TODO")
  (home-page "TODO")
  (license license:gpl3+))