|
18 | 18 | perSystem = |
19 | 19 | { |
20 | 20 | self', |
| 21 | + lib, |
21 | 22 | pkgs, |
22 | 23 | ... |
23 | 24 | }: |
|
26 | 27 | in |
27 | 28 | { |
28 | 29 | packages.default = self'.packages.zmk-cli; |
29 | | - packages.zmk-cli = python.buildPythonPackage (finalAttrs: { |
30 | | - pname = "zmk"; |
31 | | - version = "0.4.0"; |
32 | | - src = ./.; |
| 30 | + packages.zmk-cli = |
| 31 | + let |
| 32 | + pyprojectToml = lib.importTOML ./pyproject.toml; |
| 33 | + in |
| 34 | + python.buildPythonPackage (finalAttrs: { |
| 35 | + pname = pyprojectToml.project.name; |
| 36 | + version = pyprojectToml.project.version; |
| 37 | + src = ./.; |
33 | 38 |
|
34 | | - pyproject = true; |
| 39 | + pyproject = true; |
35 | 40 |
|
36 | | - # basically required for all python packages |
37 | | - build-system = [ |
38 | | - python.setuptools |
39 | | - python.setuptools-scm |
40 | | - ]; |
| 41 | + # basically required for all python packages |
| 42 | + build-system = [ |
| 43 | + python.setuptools |
| 44 | + python.setuptools-scm |
| 45 | + ]; |
41 | 46 |
|
42 | | - # This is required since some deps in the nixpkgs python |
43 | | - # distribution are slightly too old. But this should be resolved |
44 | | - # fairly soon |
45 | | - # |
46 | | - # At the time of writing this we have |
47 | | - # |
48 | | - # > Checking runtime dependencies for zmk-0.4.0-py3-none-any.whl |
49 | | - # > - dacite<2.0.0,>=1.9.2 not satisfied by version 1.9.1 |
50 | | - # > - mako<2.0.0,>=1.3.10 not satisfied by version 1.3.10.dev0 |
51 | | - # > - ruamel-yaml<0.19.0,>=0.18.17 not satisfied by version 0.18.16 |
52 | | - pythonRelaxDeps = true; |
| 47 | + # This is required since some deps in the nixpkgs python |
| 48 | + # distribution are slightly too old. But this should be resolved |
| 49 | + # fairly soon |
| 50 | + # |
| 51 | + # At the time of writing this we have |
| 52 | + # |
| 53 | + # > Checking runtime dependencies for zmk-0.4.0-py3-none-any.whl |
| 54 | + # > - dacite<2.0.0,>=1.9.2 not satisfied by version 1.9.1 |
| 55 | + # > - mako<2.0.0,>=1.3.10 not satisfied by version 1.3.10.dev0 |
| 56 | + # > - ruamel-yaml<0.19.0,>=0.18.17 not satisfied by version 0.18.16 |
| 57 | + pythonRelaxDeps = true; |
53 | 58 |
|
54 | | - # those were infered by just building the package, the check phase |
55 | | - # will inform you about missing deps if any new ones should pop up |
56 | | - dependencies = [ |
57 | | - python.dacite |
58 | | - python.giturlparse |
59 | | - python.mako |
60 | | - python.rich |
61 | | - python.ruamel-yaml |
62 | | - python.shellingham |
63 | | - python.typer |
64 | | - python.west |
65 | | - ]; |
66 | | - }); |
| 59 | + # those were infered by just building the package, the check phase |
| 60 | + # will inform you about missing deps if any new ones should pop up |
| 61 | + dependencies = [ |
| 62 | + python.dacite |
| 63 | + python.giturlparse |
| 64 | + python.mako |
| 65 | + python.rich |
| 66 | + python.ruamel-yaml |
| 67 | + python.shellingham |
| 68 | + python.typer |
| 69 | + python.west |
| 70 | + ]; |
| 71 | + }); |
67 | 72 | }; |
68 | 73 | }; |
69 | 74 | } |
0 commit comments