Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 argcomplete, 3 black, 4 buildPythonPackage, 5 fetchFromGitHub, 6 freezegun, 7 genson, 8 graphql-core, 9 httpx, 10 inflect, 11 isort, 12 jinja2, 13 lib, 14 openapi-spec-validator, 15 packaging, 16 poetry-core, 17 poetry-dynamic-versioning, 18 prance, 19 pytest-mock, 20 pytestCheckHook, 21 pydantic, 22 pyyaml, 23 toml, 24}: 25 26buildPythonPackage rec { 27 pname = "datamodel-code-generator"; 28 version = "0.26.5"; 29 pyproject = true; 30 31 src = fetchFromGitHub { 32 owner = "koxudaxi"; 33 repo = "datamodel-code-generator"; 34 tag = version; 35 hash = "sha256-CYNEpQFIWR7i7I7YJ5q/34KNhtQ7cjya97Z0fyeO5g8="; 36 }; 37 38 pythonRelaxDeps = [ 39 "inflect" 40 "isort" 41 ]; 42 43 build-system = [ 44 poetry-core 45 poetry-dynamic-versioning 46 ]; 47 48 dependencies = [ 49 argcomplete 50 black 51 genson 52 graphql-core 53 httpx 54 inflect 55 isort 56 jinja2 57 openapi-spec-validator 58 packaging 59 pydantic 60 pyyaml 61 toml 62 ]; 63 64 nativeCheckInputs = [ 65 freezegun 66 prance 67 pytest-mock 68 pytestCheckHook 69 ]; 70 71 pythonImportsCheck = [ "datamodel_code_generator" ]; 72 73 disabledTests = [ 74 # remote testing, name resolution failure. 75 "test_openapi_parser_parse_remote_ref" 76 ]; 77 78 meta = { 79 description = "Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources"; 80 homepage = "https://github.com/koxudaxi/datamodel-code-generator"; 81 license = lib.licenses.mit; 82 maintainers = with lib.maintainers; [ tochiaha ]; 83 mainProgram = "datamodel-code-generator"; 84 }; 85}