1{
2 buildPythonPackage,
3 fetchPypi,
4 lib,
5 apeye-core,
6 attrs,
7 click,
8 consolekit,
9 docutils,
10 dom-toml,
11 domdf-python-tools,
12 hatchling,
13 hatch-requirements-txt,
14 natsort,
15 packaging,
16 readme-renderer,
17 sdjson,
18 shippinglabel,
19 typing-extensions,
20}:
21buildPythonPackage rec {
22 pname = "pyproject-parser";
23 version = "0.13.0";
24 pyproject = true;
25
26 src = fetchPypi {
27 pname = "pyproject_parser";
28 inherit version;
29 hash = "sha256-/x3bXUJsbYs4rXPNotXK8/VohSy04M+Gk0XInoyg+3Y=";
30 };
31
32 build-system = [
33 hatchling
34 hatch-requirements-txt
35 ];
36
37 dependencies = [
38 apeye-core
39 attrs
40 dom-toml
41 domdf-python-tools
42 natsort
43 packaging
44 shippinglabel
45 typing-extensions
46 ];
47
48 optional-dependencies = {
49 all = lib.flatten (lib.attrValues (lib.filterAttrs (n: v: n != "all") optional-dependencies));
50 cli = [
51 click
52 consolekit
53 sdjson
54 ];
55 readme = [
56 docutils
57 readme-renderer
58 ]
59 ++ readme-renderer.optional-dependencies.md;
60 };
61
62 meta = {
63 description = "Parser for ‘pyproject.toml’";
64 homepage = "https://github.com/repo-helper/pyproject-parser";
65 license = lib.licenses.mit;
66 maintainers = with lib.maintainers; [ tyberius-prime ];
67 };
68}