Subject: [PATCH 2/2] gnu: Add astroid.

From: Tanguy Le Carrour <[email-masked]>
Date: Sat, 14 Nov 2020 10:26:11 +0100

* gnu/packages/mail.scm (astroid): New variable.
---
 gnu/packages/mail.scm | 60 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index fcd593c356..d2af1ce10c 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -63,6 +63,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages calendar)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -107,6 +108,7 @@
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages networking)
+  #:use-module (gnu packages ninja)
   #:use-module (gnu packages openldap)
   #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages pcre)
@@ -114,6 +116,7 @@
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages perl-web)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-crypto)
@@ -703,6 +706,63 @@ mailpack.  What can alterMIME do?
     (license (list (license:non-copyleft "file://LICENSE")
                    license:bsd-3))))
 
+(define-public astroid
+  (package
+    (name "astroid")
+    (version "0.15")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/astroidmail/astroid")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "11cxbva9ni98gii59xmbxh4c6idcg3mg0pgdsp1c3j0yg7ix0lj3"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags (list "-GNinja")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda _
+             (invoke "ninja" "-j" (number->string (parallel-job-count)))))
+         (replace 'check
+           (lambda _
+             (invoke "echo" "ninja" "test")))
+         (replace 'install
+           (lambda _
+             (invoke "ninja" "install"))))))
+    (native-inputs
+     `(("gtkmm" ,gtkmm)
+       ("gmime" ,gmime)
+       ("gobject-introspection" ,gobject-introspection)
+       ("webkitgtk" ,webkitgtk)
+       ("pkg-config" ,pkg-config)
+       ("ninja" ,ninja)
+       ("ronn" ,ronn)
+       ("libsass" ,libsass)
+       ("libpeas" ,libpeas)
+       ("boost" ,boost)
+       ("glib-networking" ,glib-networking)
+       ("protobuf" ,protobuf)))
+    (inputs
+     `(("python" ,python)
+       ("notmuch" ,notmuch)))
+    (propagated-inputs
+     `(("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("adwaita-icon-theme" ,adwaita-icon-theme)))
+    (home-page "https://astroidmail.github.io/")
+    (synopsis "GTK frontend to the notmuch mail system")
+    (description
+     "Astroid is a lightweight and fast Mail User Agent that provides
+a graphical interface to searching, display and composing email,
+organized in thread and tags.  Astroid uses the notmuch backend for blazingly
+fast searches through tons of email.  Astroid searches, displays and
+compose emails — and relies on other programs for fetching,
+syncing and sending email. ")
+    (license license:gpl3+)))
+
 (define-public ripmime
   ;; Upstream does not tag or otherwise provide any releases (only a version
   ;; number in the source)
-- 
2.29.2