Something went wrong. Try again.
lol
Something went wrong. Try again.
2.0 kB · 101 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102{ lib, argcomplete, black, buildPythonPackage, fetchFromGitHub, genson, graphql-core, hatch-vcs, hatchling, httpx, inflect, inline-snapshot, isort, jinja2, openapi-spec-validator, packaging, prance, ruff, pydantic, pysnooper, pytest-mock, pytestCheckHook, pyyaml, time-machine, watchfiles,}:
buildPythonPackage rec { pname = "datamodel-code-generator"; version = "0.55.0"; pyproject = true;
src = fetchFromGitHub { owner = "koxudaxi"; repo = "datamodel-code-generator"; tag = version; hash = "sha256-zsLJv7gKhmnEIS/AUvnBzm+07QFQoMdiFo/PkfRyHek="; };
pythonRelaxDeps = [ "inflect" "isort" ];
build-system = [ hatchling hatch-vcs ];
dependencies = [ argcomplete black genson inflect isort jinja2 packaging pydantic pyyaml ];
optional-dependencies = { all = lib.concatAttrValues (lib.removeAttrs optional-dependencies [ "all" ]); debug = [ pysnooper ]; graphql = [ graphql-core ]; http = [ httpx ]; ruff = [ ruff ]; validation = [ openapi-spec-validator prance ]; watch = [ watchfiles ]; };
nativeCheckInputs = [ inline-snapshot pytest-mock pytestCheckHook time-machine ] ++ optional-dependencies.all;
pythonImportsCheck = [ "datamodel_code_generator" ];
disabledTests = [ # remote testing, name resolution failure. "test_openapi_parser_parse_remote_ref" ];
meta = { description = "Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources"; homepage = "https://github.com/koxudaxi/datamodel-code-generator"; changelog = "https://github.com/koxudaxi/datamodel-code-generator/releases/tag/${src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ tochiaha ]; mainProgram = "datamodel-code-generator"; };}