From patchwork Mon Sep 25 20:21:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: pinoaffe X-Patchwork-Id: 54284 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E6BDE27BBE2; Mon, 25 Sep 2023 21:23:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 085BB27BBE9 for ; Mon, 25 Sep 2023 21:23:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qks6X-0000TI-79; Mon, 25 Sep 2023 16:22:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qks6U-0000SU-NS for guix-patches@gnu.org; Mon, 25 Sep 2023 16:22:50 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qks6U-0003tf-F5 for guix-patches@gnu.org; Mon, 25 Sep 2023 16:22:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qks6h-0004Wm-0I for guix-patches@gnu.org; Mon, 25 Sep 2023 16:23:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65976] [PATCH v3 4/4] gnu: Add mailctl. Resent-From: pinoaffe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Sep 2023 20:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65976 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65976@debbugs.gnu.org Cc: pinoaffe Received: via spool by 65976-submit@debbugs.gnu.org id=B65976.169567333817320 (code B ref 65976); Mon, 25 Sep 2023 20:23:02 +0000 Received: (at 65976) by debbugs.gnu.org; 25 Sep 2023 20:22:18 +0000 Received: from localhost ([127.0.0.1]:46738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qks5x-0004VH-FO for submit@debbugs.gnu.org; Mon, 25 Sep 2023 16:22:17 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:51670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qks5p-0004UM-0u for 65976@debbugs.gnu.org; Mon, 25 Sep 2023 16:22:10 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50335f6b48dso12476316e87.3 for <65976@debbugs.gnu.org>; Mon, 25 Sep 2023 13:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695673310; x=1696278110; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aogUTm6eh6/tCtxYDf8go6xjJRLkJt9jMlW72XSxsHk=; b=J14MCWFXNuOf8NfWRQk5l+3Ao8mBY6BmnuwqvvZVeUGf4LRsy1/3pBlShhlM+6DPYT 2D7uthEOE/MFqxNmcEB99Md9T/aWoCNaUMIVsOPh7Rh/ZYPNNeVesBzi4yMmwo23Fnnm yfwO4Ogv7VBSu528/sS3woyGLhFA4OA68s+ui3J/QVBTFCfKcMtnF0rXo40Zi9R6lRuY eApK81Kqq+zvWsiYa5lup8dcwIUluvAHiO7+zi5ue+ebWLliSNhZhcLz14tV91maIxN6 mfCMTbjFPjKKsHdp3x/PT3A/MG4Itte7/iAVd0ITSK7Vb9ph88o9SmEqiyqj1G3GEzoU VaxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695673310; x=1696278110; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aogUTm6eh6/tCtxYDf8go6xjJRLkJt9jMlW72XSxsHk=; b=F4EjRitX2vbBfqAhhnWZ1Uh9AXFnniAAVp9gyPN03E+1edEO7n5YLko8x688+L7lz1 yL8JPpbXgKqhbQzI+aoaLCpL1fsHGSwvkVXITq34WYBqhKimyPvxzaEHmxF26pTQ/9ZE kzsT6rKbT+dy3E+FZ39pgDh3vsSNEMNPJs9zZjkwsWlwt8FdqxEJmpctTvOnpjqvJm2I 3kjllwDQFEwzfXcxe+3dpC5Qa6nTWtHypZkYR2UWIHcJhtFXkMvnEHg8KrJ6cwMGk+ST 9ko0aXSCJhFTMAedTkaAVmnXDALUwYlVVQrcuZIEF23xbevvLcjJ8l/H8APLzBBlO+DL dxug== X-Gm-Message-State: AOJu0Yzk7m2CI+e49B4YFt8NcPkgDeaEd8CiTzoYny2WjYZjRCsGHBsU Jhe+4IaLBMwWyyKmswpkToJ6AgDVwuw= X-Google-Smtp-Source: AGHT+IH1fzLus5GyyGkc/BV0WkGz8pgIg4dR+JXROVAxhd/2G+Q6X64SYESwnprH0Jdb9fh/yRRQyQ== X-Received: by 2002:ac2:5333:0:b0:500:9d4a:8a02 with SMTP id f19-20020ac25333000000b005009d4a8a02mr6253501lfh.62.1695673310359; Mon, 25 Sep 2023 13:21:50 -0700 (PDT) Received: from localhost (h120217.upc-h.chello.nl. [62.194.120.217]) by smtp.gmail.com with ESMTPSA id eg42-20020a05640228aa00b00533dad8a9c5sm2785042edb.38.2023.09.25.13.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 13:21:50 -0700 (PDT) From: pinoaffe Date: Mon, 25 Sep 2023 22:21:34 +0200 Message-ID: <150f319bd7c6926ae3a6c9e0352852526357cfa5.1695671343.git.pinoaffe@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <6ed1b70e5e02a6c46aedf8912ed8d3d5bfa247a8.1695671343.git.pinoaffe@gmail.com> References: <6ed1b70e5e02a6c46aedf8912ed8d3d5bfa247a8.1695671343.git.pinoaffe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/mail.scm (mailctl): New variable. --- gnu/packages/mail.scm | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index ecaab1c7cd..4fd3e80d90 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -52,6 +52,7 @@ ;;; Copyright © 2022 jgart ;;; Copyright © 2022 ( ;;; Copyright © 2023 Timo Wilken +;;; Copyright © 2023 pinoaffe ;;; ;;; This file is part of GNU Guix. ;;; @@ -112,6 +113,7 @@ (define-module (gnu packages mail) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages haskell-web) #:use-module (gnu packages icu4c) #:use-module (gnu packages kerberos) #:use-module (gnu packages language) @@ -176,6 +178,7 @@ (define-module (gnu packages mail) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system guile) + #:use-module (guix build-system haskell) #:use-module (guix build-system meson) #:use-module (guix build-system perl) #:use-module (guix build-system pyproject) @@ -1145,6 +1148,61 @@ (define-public offlineimap3 (define-public offlineimap (deprecated-package "offlineimap" offlineimap3)) +(define-public mailctl + (package + (name "mailctl") + (version "0.9.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pdobsan/mailctl") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "18mjlvf8h0afirlr2pw30p9cpcyhfw4g41c0liqbsan684cj3dk1")))) + (build-system haskell-build-system) + (home-page "https://github.com/pdobsan/mailctl") + (arguments `(#:phases (modify-phases %standard-phases + ;; The mailctl.cabal file specifies a minimum cabal + ;; version of 3.8 (which is newer than the cabal + ;; packaged in guix), but doesn't use any new + ;; features and it builds with 3.6. + (add-after 'unpack 'patch-cabal-version + (lambda _ + (substitute* "mailctl.cabal" + (("3.8") "3.6"))))))) + (inputs (list ghc-aeson + ghc-hsyslog + ghc-http-conduit + ghc-network-uri + ghc-optparse-applicative + ghc-pretty-simple + ghc-twain + ghc-base64 + ghc-strings + ghc-utf8-string + ghc-warp + ghc-yaml)) + (synopsis "Authorize and renew OAuth2 credentials for IMAP/SMTP clients") + (description "@code{mailctl} provides IMAP/SMTP clients with the +capabilities of renewal and authorization of OAuth2 credentials. + +Many IMAP/SMTP clients, like @code{offlineimap}, @code{msmtp}, @code{fdm}, +@code{isync}, @code{neomutt} or @code{mutt} can use OAuth2 access tokens but +lack the ability to renew and/or authorize OAuth2 credentials. The purpose of +@code{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. + +If an IMAP/SMTP client cannot use an OAuth2 access token itself it may be +\"wrapped\" with @code{fdm} and @code{msmtp} with the help of @code{mailctl}. + +@code{mailctl} also has some functionalities to manage the orchestration of a +mailing system comprised of @code{msmtp}, @code{fdm}, and @code{mutt} or +similar ones.") + (license license:bsd-3))) + (define-public emacs-mew (let ((commit "35772ee0b44dd7e56b0f3899b27fa545b2bc6f03") (revision "1"))