1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 flit-core,
6 pytestCheckHook,
7 pythonAtLeast,
8}:
9
10buildPythonPackage rec {
11 pname = "mypy-extensions";
12 version = "1.1.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "python";
17 repo = "mypy_extensions";
18 tag = version;
19 hash = "sha256-HNAFsWX4tU9hfZkKxLNJn1J+H3uTesQflbRPlo3GQ4k=";
20 };
21
22 dependencies = [ flit-core ];
23
24 # make the testsuite run with pytest, so we can disable individual tests
25 nativeCheckInputs = [ pytestCheckHook ];
26
27 enabledTestPaths = [ "tests/testextensions.py" ];
28
29 disabledTests = lib.optionals (pythonAtLeast "3.14") [
30 # https://github.com/python/mypy_extensions/issues/65
31 "test_py36_class_syntax_usage"
32 ];
33
34 pythonImportsCheck = [ "mypy_extensions" ];
35
36 meta = {
37 description = "Experimental type system extensions for programs checked with the mypy typechecker";
38 homepage = "https://www.mypy-lang.org";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ lnl7 ];
41 };
42}