# aerc.scm -rw-r--r-- 5.5 KiB View raw
                                                                                
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
;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix 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.
;;;
;;; GNU Guix 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 GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages aerc)
  #:use-module (guix build-system go)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages video)
  #:use-module (gnu packages golang)
  #:use-module (guixrus packages common go))

(define-public aerc
  (package
    (name "aerc")
    (version "0.0.0-20220531123251-2551dd1bfa2c")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://git.sr.ht/~rjarry/aerc")
                    (commit (go-version->git-ref version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1zbskcsfpg8akifnaffwxsm6pi8j0mk6aq1rkymnr6ll28l0pkl2"))))
    (build-system go-build-system)
    (arguments
     (list #:import-path "git.sr.ht/~rjarry/aerc"
           #:build-flags
           #~(list "-tags=notmuch"
                   ;; These flags are set as GO_LDFLAGS in the makefile.
                   "-X" (string-append "main.Version="
                                       #$(go-version->git-ref version))
                   "-X" (string-append "git.sr.ht/~rjarry/aerc/config.shareDir="
                                       #$output "/share/aerc"))
           #:phases
           #~(modify-phases %standard-phases
              (add-after 'build 'doc
                (lambda* (#:key import-path #:allow-other-keys)
                  (with-directory-excursion (string-append "src/" import-path)
                    (invoke "make" "doc"))))
              (replace 'install
                (lambda* (#:key outputs import-path #:allow-other-keys)
                  (let ((out (assoc-ref outputs "out")))
                    (with-directory-excursion (string-append "src/" import-path)
                      (invoke "make" "install"
                              (string-append "PREFIX=" out)))))))))
    (native-inputs (list make scdoc))
    (propagated-inputs (list go-github-com-zenhack-go-notmuch
                             go-github-com-protonmail-crypto
                             go-gopkg-in-yaml-v2
                             go-google-golang-org-protobuf
                             go-google-golang-org-appengine
                             go-golang-org-x-term
                             go-golang-org-x-sys
                             go-golang-org-x-oauth2
                             go-golang-org-x-net
                             go-github-com-xo-terminfo
                             go-github-com-stretchr-testify
                             go-github-com-riywo-loginshell
                             go-github-com-pkg-errors
                             go-github-com-mitchellh-go-homedir
                             go-github-com-miolini-datacounter
                             go-github-com-mattn-go-runewidth
                             go-github-com-mattn-go-pointer
                             go-github-com-mattn-go-isatty
                             go-github-com-lucasb-eyer-go-colorful
                             go-github-com-lithammer-fuzzysearch
                             go-github-com-kyoh86-xdg
                             go-github-com-imdario-mergo
                             go-github-com-google-shlex
                             go-github-com-golang-protobuf
                             go-github-com-go-ini-ini
                             go-github-com-gdamore-tcell
                             go-github-com-gatherstars-com-jwz
                             go-github-com-fsnotify-fsnotify
                             go-github-com-emersion-go-smtp
                             go-github-com-emersion-go-sasl
                             go-github-com-emersion-go-pgpmail
                             go-github-com-emersion-go-message
                             go-github-com-emersion-go-maildir
                             go-github-com-emersion-go-imap-sortthread
                             go-github-com-emersion-go-imap
                             go-github-com-ddevault-go-libvterm
                             go-github-com-danwakefield-fnmatch
                             go-github-com-creack-pty
                             go-github-com-arran4-golang-ical
                             go-github-com-protonmail-go-crypto
                             go-git-sr-ht--sircmpwn-getopt))
    (home-page "https://git.sr.ht/~rjarry/aerc")
    (synopsis "A pretty good email client")
    (description "@code{aerc} is an email client for your terminal.")
    (license license:expat)))