about summary refs log tree commit diff
path: root/pkgs/development/python-modules/mypy/extensions.nix
blob: 04b22e2c543875dc5e90684386d234a1b3144a01 (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
, fetchFromGitHub
, buildPythonPackage
, typing
, python
, pythonOlder
}:

buildPythonPackage rec {
  pname = "mypy-extensions";
  version = "0.4.3";

  src = fetchFromGitHub {
    owner = "python";
    repo = "mypy_extensions";
    rev = version;
    sha256 = "sha256-JjhbxX5DBAbcs1o2fSWywz9tot792q491POXiId+NyI=";
  };

  propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;

  checkPhase = ''
    ${python.interpreter} -m unittest discover tests
  '';

  pythonImportsCheck = [ "mypy_extensions" ];

  meta = with lib; {
    description = "Experimental type system extensions for programs checked with the mypy typechecker";
    homepage = "http://www.mypy-lang.org";
    license = licenses.mit;
    maintainers = with maintainers; [ martingms lnl7 SuperSandro2000 ];
  };
}