Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / mypy / extensions.nix
blobbdd6c63da6fca59037abc296422bbd934578d904
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , typing
5 , pytestCheckHook
6 , pythonAtLeast
7 , pythonOlder
8 }:
10 buildPythonPackage rec {
11   pname = "mypy-extensions";
12   version = "1.0.0";
14   src = fetchFromGitHub {
15     owner = "python";
16     repo = "mypy_extensions";
17     rev = version;
18     hash = "sha256-gOfHC6dUeBE7SsWItpUHHIxW3wzhPM5SuGW1U8P7DD0=";
19   };
21   propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;
23   # make the testsuite run with pytest, so we can disable individual tests
24   nativeCheckInputs = [
25     pytestCheckHook
26   ];
28   pytestFlagsArray = [
29     "tests/testextensions.py"
30   ];
32   disabledTests = lib.optionals (pythonAtLeast "3.11") [
33     # https://github.com/python/mypy_extensions/issues/24
34     "test_typeddict_errors"
35   ];
37   pythonImportsCheck = [
38     "mypy_extensions"
39   ];
41   meta = with lib; {
42     description = "Experimental type system extensions for programs checked with the mypy typechecker";
43     homepage = "https://www.mypy-lang.org";
44     license = licenses.mit;
45     maintainers = with maintainers; [ martingms lnl7 ];
46   };