aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/msrestazure/default.nix
blob: 96c546e5d3553fe85d6ab67163097815e552acea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ pkgs
, lib
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, adal
, msrest
, mock
, httpretty
, pytest
, pytest-asyncio
}:

buildPythonPackage rec {
  version = "0.6.4";
  pname = "msrestazure";

  # Pypi tarball doesnt include tests
  # see https://github.com/Azure/msrestazure-for-python/pull/133
  src = fetchFromGitHub {
    owner = "Azure";
    repo = "msrestazure-for-python";
    rev = "v${version}";
    sha256 = "0ik81f0n6r27f02gblgm0vl5zl3wc6ijsscihgvc1fgm9f5mk5b5";
  };

  propagatedBuildInputs = [ adal msrest ];

  checkInputs = [ httpretty mock pytest ]
                ++ lib.optionals isPy3k [ pytest-asyncio ];

  checkPhase = ''
    pytest tests/
  '';

  meta = with pkgs.lib; {
    description = "The runtime library 'msrestazure' for AutoRest generated Python clients.";
    homepage = "https://azure.microsoft.com/en-us/develop/python/";
    license = licenses.mit;
    maintainers = with maintainers; [ bendlas jonringer ];
  };
}