From: John Kehayias via Guix-patches via <guix-patches@gnu.org>
To: "56404@debbugs.gnu.org" <56404@debbugs.gnu.org>
Subject: [bug#56404] [PATCH 2/2] gnu: Add oauth2ms.
Date: Tue, 05 Jul 2022 17:25:40 +0000 [thread overview]
Message-ID: <oqDaRG8_DEMeotoMdymsVnd4dG1mDKtMWt3z3zY8SIVUg_EHtQL5rVMKnzz4LryWWZy4qXwMpGJo_PXLPcef3wUZxirT-BzEJdq5NQqyzkE=@protonmail.com> (raw)
In-Reply-To: <p-Wza1MknYRefoD6SE9qJq0ASdnGySKFjvnzIc3LGoQMoB4yspPjtKFwHsjFB-G95s31BrYON1XqaOhgikNywQQW0c_koHHJh3QNbevhpeM=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 13 bytes --]
Empty Message
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-oauth2ms.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-oauth2ms.patch, Size: 3470 bytes --]
From 316c05e7519c0d9fc3ccefbb89dbfcc19104d3c1 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Tue, 5 Jul 2022 13:13:07 -0400
Subject: [PATCH 2/2] gnu: Add oauth2ms.
* gnu/packages/python-web.scm (oauth2ms): New variable.
---
gnu/packages/python-web.scm | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index a2dcf49569..834b40fc58 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -73,16 +73,20 @@ (define-module (gnu packages python-web)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system python)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages django)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages groff)
#:use-module (gnu packages libevent)
@@ -2986,6 +2990,43 @@ (define-public python-msal
protocols.")
(license license:expat)))
+(define-public oauth2ms
+ (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08") (revision "0"))
+ (package
+ (name "oauth2ms")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/harishkrupo/oauth2ms")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
+ (build-system copy-build-system)
+ (arguments
+ (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
+ ("."
+ #$(string-append "share/doc/" name "-" version "/")
+ #:include-regexp ("\\.org$")))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-pythonpath
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((path (getenv "GUIX_PYTHONPATH")))
+ (wrap-program (string-append #$output
+ "/bin/oauth2ms")
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,path)))))))))
+ (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
+ (home-page "https://github.com/harishkrupo/oauth2ms")
+ (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
+ (description
+ "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft Identity
+endpoint. Additionally, it can encode the token in the XOAUTH2 format to be
+used as authentication in IMAP mail servers.")
+ (license license:asl2.0))))
+
(define-public python-oauthlib
(package
(name "python-oauthlib")
--
2.36.1
next prev parent reply other threads:[~2022-07-05 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 17:22 [bug#56404] [PATCH 0/2] gnu: Add python-msal and oauth2ms John Kehayias via Guix-patches via
2022-07-05 17:24 ` [bug#56404] [PATCH 1/2] gnu: Add python-msal John Kehayias via Guix-patches via
2022-07-05 17:25 ` John Kehayias via Guix-patches via [this message]
2022-07-17 19:41 ` bug#56404: [PATCH 0/2] gnu: Add python-msal and oauth2ms Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='oqDaRG8_DEMeotoMdymsVnd4dG1mDKtMWt3z3zY8SIVUg_EHtQL5rVMKnzz4LryWWZy4qXwMpGJo_PXLPcef3wUZxirT-BzEJdq5NQqyzkE=@protonmail.com' \
--to=guix-patches@gnu.org \
--cc=56404@debbugs.gnu.org \
--cc=john.kehayias@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).