From 940760d4c8069805ba327f880b0759b3f6e226b9 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 7 Nov 2022 00:57:39 +0100 Subject: [PATCH] oauth2ms: init at 2021-07-09 --- pkgs/tools/networking/oauth2ms/default.nix | 35 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tools/networking/oauth2ms/default.nix diff --git a/pkgs/tools/networking/oauth2ms/default.nix b/pkgs/tools/networking/oauth2ms/default.nix new file mode 100644 index 000000000000000..b32ea14d3a9f1f7 --- /dev/null +++ b/pkgs/tools/networking/oauth2ms/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchFromGitHub, python3 }: + +stdenv.mkDerivation { + pname = "oauth2ms"; + version = "2021-07-09"; + + src = fetchFromGitHub { + owner = "harishkrupo"; + repo = "oauth2ms"; + rev = "a1ef0cabfdea57e9309095954b90134604e21c08"; # No tags or releases in the repo + sha256 = "sha256-xPSWlHJAXhhj5I6UMjUtH1EZqCZWHJMFWTu3a4k1ETc"; + }; + + buildInputs = [ + (python3.withPackages (ps: with ps; [ + pyxdg + msal + python-gnupg + ])) + ]; + + installPhase = '' + runHook preInstall + install -m755 -D oauth2ms $out/bin/oauth2ms + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/harishkrupo/oauth2ms"; + description = "XOAUTH2 compatible Office365 token fetcher"; + platforms = platforms.all; + license = licenses.asl20; + maintainers = with maintainers; [ wentasah ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef335956c6ec7e1..56559590d5ae03c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4666,6 +4666,8 @@ with pkgs; nyx = callPackage ../tools/networking/nyx { }; + oauth2ms = callPackage ../tools/networking/oauth2ms { }; + oci-cli = callPackage ../tools/admin/oci-cli { }; ocrmypdf = with python3.pkgs; toPythonApplication ocrmypdf;