summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyannotate/default.nix
blob: 332a4161fe787883b157ec0b87358f7d2dec419e (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, six
, mypy-extensions
, typing
, pytest
}:

buildPythonPackage rec {
  version = "1.2.0";
  pname = "pyannotate";

  src = fetchPypi {
    inherit pname version;
    sha256 = "16bm0mf7wxvy0lgmcs1p8n1ji8pnvj1jvj8zk3am70dkp825iv84";
  };

  checkInputs = [ pytest ];
  propagatedBuildInputs = [ six mypy-extensions ]
    ++ lib.optionals (pythonOlder "3.5") [ typing ];

  checkPhase = ''
    py.test
  '';

  meta = with lib; {
    homepage = "https://github.com/dropbox/pyannotate";
    description = "Auto-generate PEP-484 annotations";
    license = licenses.mit;
    maintainers = [ maintainers.costrouc ];
  };
}