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