1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 flit-core,
6 pythonOlder,
7
8 # reverse dependencies
9 mashumaro,
10 pydantic,
11}:
12
13buildPythonPackage rec {
14 pname = "typing-extensions";
15 version = "4.12.2";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchPypi {
21 pname = "typing_extensions";
22 inherit version;
23 hash = "sha256-Gn6tVcflWd1N7ohW46iLQSJav+HOjfV7fBORX+Eh/7g=";
24 };
25
26 nativeBuildInputs = [ flit-core ];
27
28 # Tests are not part of PyPI releases. GitHub source can't be used
29 # as it ends with an infinite recursion
30 doCheck = false;
31
32 pythonImportsCheck = [ "typing_extensions" ];
33
34 passthru.tests = {
35 inherit mashumaro pydantic;
36 };
37
38 meta = with lib; {
39 description = "Backported and Experimental Type Hints for Python";
40 changelog = "https://github.com/python/typing_extensions/blob/${version}/CHANGELOG.md";
41 homepage = "https://github.com/python/typing";
42 license = licenses.psfl;
43 maintainers = with maintainers; [ pmiddend ];
44 };
45}