1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 msal, 6 portalocker, 7 setuptools, 8 stdenv, 9 pythonOlder, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "msal-extensions"; 15 version = "1.3.1"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "AzureAD"; 22 repo = "microsoft-authentication-extensions-for-python"; 23 tag = version; 24 hash = "sha256-LRopszB8+8N9EajSmZvz0MTomp/qWZ5O3q00AHimZbY="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 pythonRelaxDeps = [ "portalocker" ]; 30 31 dependencies = [ 32 msal 33 portalocker 34 ]; 35 36 nativeCheckInputs = [ pytestCheckHook ]; 37 38 disabledTests = 39 [ 40 # `from gi.repository import Secret` fails to find libsecret 41 "test_token_cache_roundtrip_with_persistence_builder" 42 "test_libsecret_persistence" 43 "test_nonexistent_libsecret_persistence" 44 # network access 45 "test_token_cache_roundtrip_with_file_persistence" 46 ] 47 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 48 # msal_extensions.osx.KeychainError 49 "test_keychain_roundtrip" 50 "test_keychain_persistence" 51 ]; 52 53 pythonImportsCheck = [ "msal_extensions" ]; 54 55 meta = with lib; { 56 description = "Microsoft Authentication Library Extensions (MSAL-Extensions) for Python"; 57 homepage = "https://github.com/AzureAD/microsoft-authentication-extensions-for-python"; 58 changelog = "https://github.com/AzureAD/microsoft-authentication-extensions-for-python/releases/tag/${version}"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ kamadorueda ]; 61 }; 62}