1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, httpretty
5, pyjwt
6, pytestCheckHook
7, python-dateutil
8, requests
9}:
10
11buildPythonPackage rec {
12 pname = "adal";
13 version = "1.2.7";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "AzureAD";
18 repo = "azure-activedirectory-library-for-python";
19 rev = version;
20 hash = "sha256-HE8/P0aohoZNeMdcQVKdz6M31FMrjsd7oVytiaD0idI=";
21 };
22
23 postPatch = ''
24 sed -i '/cryptography/d' setup.py
25 '';
26
27 propagatedBuildInputs = [
28 pyjwt
29 python-dateutil
30 requests
31 ];
32
33 checkInputs = [
34 httpretty
35 pytestCheckHook
36 ];
37
38 disabledTests = [
39 # AssertionError: 'Mex [23 chars]tp error:...
40 "test_failed_request"
41 ];
42
43 pythonImportsCheck = [
44 "adal"
45 ];
46
47 meta = with lib; {
48 description = "Python module to authenticate to Azure Active Directory (AAD) in order to access AAD protected web resources";
49 homepage = "https://github.com/AzureAD/azure-activedirectory-library-for-python";
50 license = licenses.mit;
51 maintainers = with maintainers; [ ];
52 };
53}