From patchwork Tue Oct 24 09:24:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: pinoaffe X-Patchwork-Id: 55271 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 01F7D27BBE9; Tue, 24 Oct 2023 10:26:14 +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 1303027BBE2 for ; Tue, 24 Oct 2023 10:26:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvDfP-0003fh-2H; Tue, 24 Oct 2023 05:25:39 -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 1qvDfK-0003el-9j for guix-patches@gnu.org; Tue, 24 Oct 2023 05:25:34 -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 1qvDfK-0005mf-0P for guix-patches@gnu.org; Tue, 24 Oct 2023 05:25:34 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvDfn-0001qy-FA for guix-patches@gnu.org; Tue, 24 Oct 2023 05:26:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65976] [PATCH v4 4/4] gnu: Add mailctl. Resent-From: pinoaffe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Oct 2023 09:26:03 +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.16981395247045 (code B ref 65976); Tue, 24 Oct 2023 09:26:03 +0000 Received: (at 65976) by debbugs.gnu.org; 24 Oct 2023 09:25:24 +0000 Received: from localhost ([127.0.0.1]:53156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvDfA-0001pY-0Q for submit@debbugs.gnu.org; Tue, 24 Oct 2023 05:25:24 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:55644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvDf3-0001ol-0T for 65976@debbugs.gnu.org; Tue, 24 Oct 2023 05:25:21 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-99de884ad25so638599766b.3 for <65976@debbugs.gnu.org>; Tue, 24 Oct 2023 02:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698139482; x=1698744282; 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=JdRQEo6IPRT+BNk/hbTv9eXFaVrg9fD7GXPitv70XUY=; b=FxWaD6yKGkVuqG8Gj9zK5VbV5Sx2iTkrQsrGb6ZSaYlGlBiLtTCi9YRPfKU8LEwi3I kMhD5MkVsyYLjqGCr9Wg3xlEixOdPiJMdsEvmGzt8LmDBP1SucdJMEmYvalfckwUMzvh NrcPn1Vxw1sh/8SOSYFEgkeKdSln6kZ2WN5BMdKiZUCIOcKKiljYnuX8tlrc7CQSNV02 BHLzLZmZu2KC6yRNNeU5lebFcPtF5A40/gGzucjkW8tJH1+m5t11PHUgDsuCspLbGUl/ Xmc9bC89no3tV2J6BR9w6NdkJJVkm5FLaVi2kTqwT7VjI1C+1vIoFR2mOD2z3adljsxF 8hAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698139482; x=1698744282; 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=JdRQEo6IPRT+BNk/hbTv9eXFaVrg9fD7GXPitv70XUY=; b=xDxtowR+sIk/2cT2lmoVioTkALR8x7QkMX0TzTLTXnGK2CcS8FNxyLS/ANInV/I3vf TM/gy8NFJG4ObzED2oQqK4lY83W+A21ue6rtm0LmdRADAOz5bahI+IQffViVUqaLWQWn Rf/IVksjOboQya3AeQM54zD+PI5gSq+0GXs7S0b5D3/D/aq9RnSo9gTn3f+CX+HATGdT 2yi1KuCoZUnmT/OR3drfVHBvJxNnf2FBNyY2bHPEMLjJymhTu8dKgS+cBq2H3xkbGiLC ErA4bPqjyHjYIdU/uz5QLBRVC6C7rONJpIexLom3qqH9Ht/vLVJsz6syoXryVRx9ZIpq V1JA== X-Gm-Message-State: AOJu0YzZTWGjAvvO3vmI/cYOTImlfeBI8IqMKfjDOUMGY3FGFjmYFP2Q Lm3pyi+X8CORop1ehLrOD3ijJHwFMTU= X-Google-Smtp-Source: AGHT+IH7DUvmILLvMrxnD9Va8wrJFnt/AGu9E9RnpSkORor8Z/o1MZskdE1Fpid++vhvyD9MfzdNMA== X-Received: by 2002:a17:907:970c:b0:9a5:a0c6:9e8e with SMTP id jg12-20020a170907970c00b009a5a0c69e8emr9572619ejc.31.1698139481802; Tue, 24 Oct 2023 02:24:41 -0700 (PDT) Received: from localhost (h120217.upc-h.chello.nl. [62.194.120.217]) by smtp.gmail.com with ESMTPSA id 25-20020a170906225900b0098f99048053sm8159395ejr.148.2023.10.24.02.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:24:41 -0700 (PDT) From: pinoaffe Date: Tue, 24 Oct 2023 11:24:08 +0200 Message-ID: <455fe91144c3e9bb8337523c5ccf525b54277043.1698139370.git.pinoaffe@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <4149766749298f89bf699a9484b0ce8c5755083a.1698139370.git.pinoaffe@gmail.com> References: <4149766749298f89bf699a9484b0ce8c5755083a.1698139370.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 9f410047e2..78bff0546c 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2023 Timo Wilken ;;; Copyright © 2023 Arjan Adriaanse ;;; Copyright © 2023 Wilko Meyer +;;; Copyright © 2023 pinoaffe ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,6 +116,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) @@ -179,6 +181,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) @@ -1148,6 +1151,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"))