diff mbox series

[bug#37444,v2,2/4] added aerc, a simple email client

Message ID 20190918153626.7825-2-mjbecze@riseup.net
State Accepted
Headers show
Series [bug#37444,v2,1/4] Added the dependcies for aerc. NOTE i tried to place depency authors next to each other. | expand

Commit Message

Martin Becze Sept. 18, 2019, 3:36 p.m. UTC
---
 gnu/packages/mail.scm | 81 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index fdbb082fdc..b878c81c66 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -28,6 +28,7 @@ 
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Martin Becze <mjbecze@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@ 
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gsasl)
   #:use-module (gnu packages gtk)
@@ -111,6 +113,7 @@ 
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
@@ -133,6 +136,7 @@ 
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system guile)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial))
@@ -3082,3 +3086,80 @@  related tools to process winmail.dat files.")
 complement or replace traditional mailing lists.  Readers may read via NNTP,
 Atom feeds or HTML archives.")
      (license agpl3+))))
+
+(define-public aerc
+  (let ((url "https://git.sr.ht/~sircmpwn/aerc"))
+    (package
+      (name "aerc")
+      (version "0.2.1")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url url)
+               (commit version)))
+         (sha256
+          (base32
+           "0l063pnz02r4jsg0kd9jp8m5nq10n5q9zdjpx26gfnd9ww4fs46h"))
+         (file-name (git-file-name name version))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "git.sr.ht/~sircmpwn/aerc"
+         #:install-source? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'setup-go-environment 'setup-make-environment
+             (lambda* (#:key outputs #:allow-other-keys)
+               (setenv "PREFIX" (assoc-ref outputs "out"))
+               #t))
+           (replace 'build
+             (lambda _
+               (with-directory-excursion "src/git.sr.ht/~sircmpwn/aerc"
+                 (invoke "make"))))
+           (replace 'install
+             (lambda _
+               (with-directory-excursion "src/git.sr.ht/~sircmpwn/aerc"
+                 (invoke "make" "install"))))
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((ncurses (assoc-ref inputs "ncurses"))
+                     (out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/aerc")
+                   `("PATH" ":" prefix (,(string-append ncurses "/bin")))))
+               #t)))))
+      (inputs
+       `(("ncurses" ,ncurses)))
+      (native-inputs
+       `(("scdoc" ,scdoc)
+         ("automake" ,automake)
+         ("go-git-sr-ht-sircmpwn-getopt" ,go-git-sr-ht-sircmpwn-getopt)
+         ("go-git-sr-ht-sircmpwn-pty" ,go-git-sr-ht-sircmpwn-pty)
+         ("go-git-sr-ht-sircmpwn-tcell" ,go-git-sr-ht-sircmpwn-tcell)
+         ("go-github-com-danwakefield-fnmatch"
+	 ,go-github-com-danwakefield-fnmatch)
+         ("go-github-com-ddevault-go-libvterm"
+	 ,go-github-com-ddevault-go-libvterm)
+         ("go-github-com-emersion-go-imap" ,go-github-com-emersion-go-imap)
+         ("go-github-com-emersion-go-imap-idle"
+	 ,go-github-com-emersion-go-imap-idle)
+         ("go-github-com-emersion-go-maildir" ,go-github-com-emersion-go-maildir)
+         ("go-github-com-emersion-go-message" ,go-github-com-emersion-go-message)
+         ("go-github-com-emersion-go-sasl" ,go-github-com-emersion-go-sasl)
+         ("go-github-com-emersion-go-smtp" ,go-github-com-emersion-go-smtp)
+         ("go-github-com-fsnotify-fsnotify" ,go-github-com-fsnotify-fsnotify)
+         ("go-github-com-go-ini-ini" ,go-github-com-go-ini-ini)
+         ("go-github-com-google-shlex" ,go-github-com-google-shlex)
+         ("go-github-com-kyoh86-xdg" ,go-github-com-kyoh86-xdg)
+         ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
+         ("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
+         ("go-github-com-miolini-datacounter" ,go-github-com-miolini-datacounter)
+         ("go-github-com-mitchellh-go-homedir"
+	 ,go-github-com-mitchellh-go-homedir)
+         ("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
+         ("go-github-com-riywo-loginshell" ,go-github-com-riywo-loginshell)
+         ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)))
+      (home-page url)
+      (synopsis "An email client for your terminal")
+      (description "Join the IRC channel: #aerc on irc.freenode.net for end-user
+ support, and #aerc-dev for development.")
+      (license license:expat))))