Skip to content

Commit 8f02b83

Browse files
python313Packages.datamodel-code-generator: init at 0.26.5 (NixOS#375348)
2 parents 6d535aa + 9b75f52 commit 8f02b83

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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+
python3,
23+
pyyaml,
24+
toml,
25+
}:
26+
27+
buildPythonPackage rec {
28+
pname = "datamodel-code-generator";
29+
version = "0.26.5";
30+
pyproject = true;
31+
32+
src = fetchFromGitHub {
33+
owner = "koxudaxi";
34+
repo = "datamodel-code-generator";
35+
tag = version;
36+
hash = "sha256-CYNEpQFIWR7i7I7YJ5q/34KNhtQ7cjya97Z0fyeO5g8=";
37+
};
38+
39+
pythonRelaxDeps = [ "inflect" ];
40+
41+
build-system = [
42+
poetry-core
43+
poetry-dynamic-versioning
44+
];
45+
46+
dependencies = [
47+
argcomplete
48+
black
49+
genson
50+
graphql-core
51+
httpx
52+
inflect
53+
isort
54+
jinja2
55+
openapi-spec-validator
56+
packaging
57+
pydantic
58+
pyyaml
59+
toml
60+
];
61+
62+
nativeCheckInputs = [
63+
freezegun
64+
prance
65+
pytest-mock
66+
pytestCheckHook
67+
];
68+
69+
pythonImportsCheck = [ "datamodel_code_generator" ];
70+
71+
disabledTests = [
72+
# remote testing, name resolution failure.
73+
"test_openapi_parser_parse_remote_ref"
74+
];
75+
76+
meta = {
77+
description = "Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources";
78+
homepage = "https://github.com/koxudaxi/datamodel-code-generator";
79+
license = lib.licenses.mit;
80+
maintainers = with lib.maintainers; [ tochiaha ];
81+
mainProgram = "datamodel-code-generator";
82+
};
83+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2995,6 +2995,8 @@ self: super: with self; {
29952995

29962996
datalad-next = callPackage ../development/python-modules/datalad-next { };
29972997

2998+
datamodel-code-generator = callPackage ../development/python-modules/datamodel-code-generator { };
2999+
29983000
datamodeldict = callPackage ../development/python-modules/datamodeldict { };
29993001

30003002
datapoint = callPackage ../development/python-modules/datapoint { };

0 commit comments

Comments
 (0)