1{
2 lib,
3 cryptography,
4 buildPythonPackage,
5 fetchPypi,
6 pyjwt,
7 pythonOlder,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "msal";
14 version = "1.28.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-gLur40Vny3NO/S7BhpstmBlcknRVNp2Ad7PFQgiMXJ0=";
22 };
23
24 nativeBuildInputs = [ setuptools ];
25
26 propagatedBuildInputs = [
27 cryptography
28 pyjwt
29 requests
30 ] ++ pyjwt.optional-dependencies.crypto;
31
32 # Tests assume Network Connectivity:
33 # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73
34 doCheck = false;
35
36 pythonImportsCheck = [ "msal" ];
37
38 meta = with lib; {
39 description = "Library 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";
40 homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python";
41 changelog = "https://github.com/AzureAD/microsoft-authentication-library-for-python/releases/tag/${version}";
42 license = licenses.mit;
43 maintainers = with maintainers; [ kamadorueda ];
44 };
45}