2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, lib
|
|
|
|
|
|
|
|
# pythonPackages
|
|
|
|
, pyjwt
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "msal";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "1.17.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-BOPLe7dcUfVtKQOB8jBWIH3x8+tZTtA9OFUfOxbSo24=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyjwt
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# we already have cryptography included, version bounds are causing issues
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "PyJWT[crypto]>=1.0.0,<3" "PyJWT" \
|
|
|
|
--replace "cryptography>=0.6,<38" "cryptography"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Tests assume Network Connectivity:
|
2021-05-20 23:08:51 +00:00
|
|
|
# https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "msal" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect";
|
|
|
|
homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python";
|
|
|
|
license = licenses.mit;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ kamadorueda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|