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