1{ lib
2, buildPythonPackage
3, django
4, django-stubs-ext
5, fetchPypi
6, mypy
7, pytestCheckHook
8, pythonOlder
9, tomli
10, types-pytz
11, types-pyyaml
12, typing-extensions
13}:
14
15buildPythonPackage rec {
16 pname = "django-stubs";
17 version = "4.2.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-k7r/gk8KBW5xA2tCO5QqdPB7kJ5F4/o4GFuRD1l8XAg=";
25 };
26
27 propagatedBuildInputs = [
28 django
29 django-stubs-ext
30 mypy
31 types-pytz
32 types-pyyaml
33 typing-extensions
34 ] ++ lib.optionals (pythonOlder "3.11") [
35 tomli
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 ];
41
42 meta = with lib; {
43 description = "PEP-484 stubs for Django";
44 homepage = "https://github.com/typeddjango/django-stubs";
45 changelog = "https://github.com/typeddjango/django-stubs/releases/tag/${version}";
46 license = licenses.mit;
47 maintainers = with maintainers; [ elohmeier ];
48 };
49}