1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6
7 # build-system
8 hatchling,
9
10 # dependencies
11 django,
12 pydantic,
13 typing-extensions,
14
15 # tests
16 django-stubs,
17 pytestCheckHook,
18 pytest-asyncio,
19}:
20
21buildPythonPackage rec {
22 pname = "pyngo";
23 version = "2.3.0";
24 pyproject = true;
25
26 disabled = pythonOlder "3.10";
27
28 src = fetchFromGitHub {
29 owner = "yezz123";
30 repo = "pyngo";
31 tag = version;
32 hash = "sha256-qAq5e/B/gOBt9Wj8Kfhg+uTe/Sa/Qslk2g/o0+ttIag=";
33 };
34
35 nativeBuildInputs = [
36 hatchling
37 ];
38
39 pythonRelaxDeps = [
40 "pydantic"
41 "typing-extensions"
42 ];
43
44 propagatedBuildInputs = [
45 django
46 pydantic
47 typing-extensions
48 ];
49
50 pythonImportsCheck = [ "pyngo" ];
51
52 nativeCheckInputs = [
53 django-stubs
54 pytestCheckHook
55 pytest-asyncio
56 ];
57
58 meta = with lib; {
59 changelog = "https://github.com/yezz123/pyngo/releases/tag/${version}";
60 description = "Pydantic model support for Django & Django-Rest-Framework";
61 homepage = "https://github.com/yezz123/pyngo";
62 license = licenses.mit;
63 maintainers = with maintainers; [ hexa ];
64 };
65}