at 22.05-pre 1.3 kB view raw
1{ buildPythonPackage 2, fetchPypi 3, lib 4 5# pythonPackages 6, pyjwt 7, requests 8}: 9 10buildPythonPackage rec { 11 pname = "msal"; 12 version = "1.16.0"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "240fb04dba46a27fd6a3178db8334412d0d02e0be85166f9e05bb45d03399084"; 17 }; 18 19 propagatedBuildInputs = [ 20 pyjwt 21 requests 22 ]; 23 24 # we already have cryptography included, version bounds are causing issues 25 postPatch = '' 26 substituteInPlace setup.py \ 27 --replace "PyJWT[crypto]>=1.0.0,<3" "PyJWT" \ 28 --replace "cryptography>=0.6,<38" "cryptography" 29 ''; 30 31 # Tests assume Network Connectivity: 32 # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73 33 doCheck = false; 34 35 pythonImportsCheck = [ "msal" ]; 36 37 meta = with lib; { 38 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"; 39 homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python"; 40 license = licenses.mit; 41 maintainers = with maintainers; [ kamadorueda ]; 42 }; 43}