Add mailctl

  • Open
  • quality assurance status badge
Details
One participant
  • VÖRÖSK?I András
Owner
unassigned
Submitted by
VÖRÖSK?I András
Severity
normal
V
V
VÖRÖSK?I András wrote on 13 Nov 2023 05:59
(address . guix-patches@gnu.org)
CWXF3KE145QF.SBMUG14J5VX1@gmail.com
Hi,

This series of patches adds mailctl. With mailctl You can use
fdm, msmtp and similar apps and authenticate them with OAuth2.

Thanks,
V
V
VÖRÖSK?I András wrote on 13 Nov 2023 06:03
[PATCH 1/4] gnu: Add ghc-hsyslog.
(address . 67144@debbugs.gnu.org)(name . VÖRÖSK?I András)(address . voroskoi@gmail.com)
379425ecafdc531d01aa1d46455dd5c413a5cec4.1699851831.git.voroskoi@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-hsyslog): New variable.

Change-Id: If3bbfb8aff10fb129c5d6e626d3d62469dcbaf96
---
gnu/packages/haskell-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index c02fd007f9..a5bd2f2196 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
;;; Copyright © 2023 zamfofex <zamfofex@twdb.moe>
+;;; Copyright © 2023 VÖRÖSK?I András <voroskoi@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -5728,6 +5729,27 @@ (define-public ghc-hsyaml
@end itemize")
(license license:gpl2+)))
+(define-public ghc-hsyslog
+ (package
+ (name "ghc-hsyslog")
+ (version "5.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (hackage-uri "hsyslog" version))
+ (sha256
+ (base32 "1kkypn0dd92aqv8dr112bhkr9k9r9mchnyyvy41kvhj2zg447v1y"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "hsyslog")))
+ (arguments
+ `(#:cabal-revision ("1"
+ "0k1j46nk3z64zw4bqmvw5lgy16ih200m66rv4b6ygjqv7nglqq0b")))
+ (home-page "https://github.com/peti/hsyslog")
+ (synopsis "FFI interface to syslog(3) from POSIX.1-2001")
+ (description
+ "This package provides a Haskell interface to @code{syslog}.")
+ (license license:bsd-3)))
+
(define-public ghc-http-api-data
(package
(name "ghc-http-api-data")

base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94
--
2.41.0
V
V
VÖRÖSK?I András wrote on 13 Nov 2023 06:03
[PATCH 2/4] gnu: Add ghc-twain.
(address . 67144@debbugs.gnu.org)(name . VÖRÖSK?I András)(address . voroskoi@gmail.com)
8e10aa6722deac47ac3d561d937b18c99c4d7cae.1699851831.git.voroskoi@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-twain): New variable.

Change-Id: Ic193d53c9b6892e1de34d61a9f9d4a2d2921569b
---
gnu/packages/haskell-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index a5bd2f2196..d6d858f6e1 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -6562,6 +6562,35 @@ (define-public ghc-these-lens
(description "This package provides Prism and Traversals for @code{These}.")
(license license:bsd-3)))
+(define-public ghc-twain
+ (package
+ (name "ghc-twain")
+ (version "2.1.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (hackage-uri "twain" version))
+ (sha256
+ (base32 "1hkzp2g671dagmv1qznkf3mw3l2mslckg7h0a8x8633h6i3j6br0"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "twain")))
+ (inputs (list ghc-aeson
+ ghc-case-insensitive
+ ghc-cookie
+ ghc-either
+ ghc-http-types
+ ghc-http2
+ ghc-vault
+ ghc-wai
+ ghc-wai-extra))
+ (native-inputs (list ghc-hspec ghc-hspec-discover ghc-hspec-wai))
+ (home-page "https://github.com/alexmingoia/twain")
+ (synopsis "Tiny web application framework for WAI")
+ (description
+ "Twain is tiny web application framework for WAI. It provides routing,
+parameter parsing, and an either-like monad for composing responses.")
+ (license license:bsd-3)))
+
(define-public ghc-libffi
(package
(name "ghc-libffi")
--
2.41.0
V
V
VÖRÖSK?I András wrote on 13 Nov 2023 06:03
[PATCH 3/4] gnu: Add ghc-strings.
(address . 67144@debbugs.gnu.org)(name . VÖRÖSK?I András)(address . voroskoi@gmail.com)
32d44da533685be5b44ed7922a41b8d3bbad67c6.1699851831.git.voroskoi@gmail.com
* gnu/packages/haskell-xyz.scm (ghc-strings): New variable.

Change-Id: Ia7df05ab2ff4c7e39d3f4105826658fcc27c24a2
---
gnu/packages/haskell-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm
index d6d858f6e1..0b8fbb8cd2 100644
--- a/gnu/packages/haskell-xyz.scm
+++ b/gnu/packages/haskell-xyz.scm
@@ -11898,6 +11898,29 @@ (define-public ghc-string-qq
and bytestrings.")
(license license:public-domain)))
+(define-public ghc-strings
+ (package
+ (name "ghc-strings")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (hackage-uri "strings" version))
+ (sha256
+ (base32 "1xz9v3w5s13yhk7iy9dw6i8s2jc6c0b1ci96dwmcq9a1n3l3ng4v"))))
+ (build-system haskell-build-system)
+ (properties '((upstream-name . "strings")))
+ (arguments
+ `(#:cabal-revision ("1"
+ "0jk1g71yzc5wpkr3vvhnxak61nqvisc5n90ggv6lmz4wqpqzdd0v")))
+ (home-page "https://hackage.haskell.org/package/strings/docs/Data-Strings.html")
+ (synopsis
+ "Functions for working with strings, including Text, ByteString, etc.")
+ (description
+ "This package provides various functions for working with strings, such as
+@code{join}, @code{split}, @code{toUppercase}, etc.")
+ (license license:expat)))
+
(define-public ghc-stringsearch
(package
(name "ghc-stringsearch")
--
2.41.0
V
V
VÖRÖSK?I András wrote on 13 Nov 2023 06:03
[PATCH 4/4] gnu: Add mailctl.
(address . 67144@debbugs.gnu.org)(name . VÖRÖSK?I András)(address . voroskoi@gmail.com)
dab6f903a2919cc495222385c6a81adcaed38840.1699851831.git.voroskoi@gmail.com
* gnu/packages/haskell-apps.scm (mailctl): New variable.

Change-Id: I29386081322f421bafaaa95544e4e4b69cf2a8b3
---
gnu/packages/haskell-apps.scm | 39 +++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index ac22082088..b4c6d583c2 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
;;; Copyright © 2022 David Thompson <dthompson2@worcester.edu>
+;;; Copyright © 2023 VÖRÖSK?I András <voroskoi@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,7 @@
(define-module (gnu packages haskell-apps)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
@@ -670,6 +672,43 @@ (define-public kmonad
Wayland, and Linux console environments alike.")
(license license:expat))))
+(define-public mailctl
+ (package
+ (name "mailctl")
+ (version "0.9.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/pdobsan/mailctl/archive/refs/tags/"
+ version ".tar.gz"))
+ (snippet
+ #~(begin
+ (use-modules (guix build utils))
+ (substitute* "mailctl.cabal" (("3.8") "3.6"))))
+ (sha256
+ (base32 "0p96xprgrnf7vcn73rjnjj5ddgk2swywlp16mgqqvp5i4jwschvw"))))
+ (inputs (list ghc-aeson
+ ghc-base64
+ ghc-hsyslog
+ ghc-http-conduit
+ ghc-network-uri
+ ghc-optparse-applicative
+ ghc-pretty-simple
+ ghc-strings
+ ghc-twain
+ ghc-utf8-string
+ ghc-warp
+ ghc-yaml))
+ (build-system haskell-build-system)
+ (home-page "https://github.com/pdobsan/mailctl")
+ (synopsis "OAuth2 credentials renewal for @acronym{MUA} or @acronym{MTA}")
+ (description "Many IMAP/SMTP clients, like msmtp, fdm, isync, neomutt or mutt
+can use OAuth2 access tokens but lack the ability to renew and/or authorize OAuth2
+credentials. The purpose of mailctl is to provide these missing capabilities by
+acting as a kind of smart password manager. In particular, access token renewal
+happens automatically in the background transparent to the user.")
+ (license license:bsd-3)))
+
(define-public nixfmt
(package
(name "nixfmt")
--
2.41.0
?