diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2023-04-10 20:56:16 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2023-04-10 20:56:16 +0200 |
commit | c0e3d0e72d9d636728a5171511e3ce1003203567 (patch) | |
tree | c75fbcfe4802c48fd5162792f38475d74d2cad57 /overlays/smartprom | |
parent | 24207674f36e900fd2aa51787cb70756413962c2 (diff) | |
download | nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar.gz nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar.bz2 nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.tar.xz nixos-c0e3d0e72d9d636728a5171511e3ce1003203567.zip |
bump
Diffstat (limited to 'overlays/smartprom')
-rw-r--r-- | overlays/smartprom/default.nix | 36 | ||||
-rw-r--r-- | overlays/smartprom/poetry.lock | 21 | ||||
-rw-r--r-- | overlays/smartprom/pyproject.toml | 16 | ||||
-rw-r--r-- | overlays/smartprom/setup.py | 11 |
4 files changed, 55 insertions, 29 deletions
diff --git a/overlays/smartprom/default.nix b/overlays/smartprom/default.nix index 807f3f84..57ab6f11 100644 --- a/overlays/smartprom/default.nix +++ b/overlays/smartprom/default.nix | |||
@@ -1,21 +1,21 @@ | |||
1 | { final, prev, flakeInputs, sources, ... }: | 1 | { prev, sources, ... }: |
2 | let | 2 | { |
3 | inherit (prev.stdenv.targetPlatform) system; | 3 | smartprom = |
4 | in { | 4 | with prev.poetry2nix; |
5 | smartprom = flakeInputs.mach-nix.lib.${system}.buildPythonPackage rec { | 5 | mkPoetryApplication { |
6 | inherit (sources.smartprom) src pname version; | 6 | inherit (sources.smartprom) pname version; |
7 | ignoreDataOutdated = true; | 7 | projectDir = cleanPythonSources { |
8 | src = prev.runCommand "sources" {} '' | ||
9 | mkdir $out | ||
10 | cp -r ${sources.smartprom.src}/. $out | ||
8 | 11 | ||
9 | prePatch = '' | 12 | mkdir $out/smartprom |
10 | mkdir smartprom | 13 | mv $out/smartprom.py $out/smartprom/__main__.py |
11 | mv smartprom.py smartprom/__main__.py | 14 | echo >> $out/smartprom/__init__.py |
12 | echo >> smartprom/__init__.py | ||
13 | 15 | ||
14 | substituteAll ${./setup.py} ./setup.py | 16 | cp ${./pyproject.toml} $out/pyproject.toml |
15 | ''; | 17 | cp ${./poetry.lock} $out/poetry.lock |
16 | 18 | ''; | |
17 | requirements = '' | 19 | }; |
18 | prometheus_client | 20 | }; |
19 | ''; | ||
20 | }; | ||
21 | } | 21 | } |
diff --git a/overlays/smartprom/poetry.lock b/overlays/smartprom/poetry.lock new file mode 100644 index 00000000..de8be1f8 --- /dev/null +++ b/overlays/smartprom/poetry.lock | |||
@@ -0,0 +1,21 @@ | |||
1 | # This file is automatically @generated by Poetry and should not be changed by hand. | ||
2 | |||
3 | [[package]] | ||
4 | name = "prometheus-client" | ||
5 | version = "0.16.0" | ||
6 | description = "Python client for the Prometheus monitoring system." | ||
7 | category = "main" | ||
8 | optional = false | ||
9 | python-versions = ">=3.6" | ||
10 | files = [ | ||
11 | {file = "prometheus_client-0.16.0-py3-none-any.whl", hash = "sha256:0836af6eb2c8f4fed712b2f279f6c0a8bbab29f9f4aa15276b91c7cb0d1616ab"}, | ||
12 | {file = "prometheus_client-0.16.0.tar.gz", hash = "sha256:a03e35b359f14dd1630898543e2120addfdeacd1a6069c1367ae90fd93ad3f48"}, | ||
13 | ] | ||
14 | |||
15 | [package.extras] | ||
16 | twisted = ["twisted"] | ||
17 | |||
18 | [metadata] | ||
19 | lock-version = "2.0" | ||
20 | python-versions = ">=3.10.0,<3.12" | ||
21 | content-hash = "a84309056a73a8051b1c506324a43036ecfa6e4584882d2ec30ef1d6e030b1a1" | ||
diff --git a/overlays/smartprom/pyproject.toml b/overlays/smartprom/pyproject.toml new file mode 100644 index 00000000..ad58bd51 --- /dev/null +++ b/overlays/smartprom/pyproject.toml | |||
@@ -0,0 +1,16 @@ | |||
1 | [tool.poetry] | ||
2 | name = "smartprom" | ||
3 | version = "2.2.0" | ||
4 | authors = [] | ||
5 | description = "" | ||
6 | |||
7 | [tool.poetry.scripts] | ||
8 | smartprom = "smartprom.__main__:main" | ||
9 | |||
10 | [tool.poetry.dependencies] | ||
11 | python = ">=3.10.0,<3.12" | ||
12 | prometheus-client = "^0.16.0" | ||
13 | |||
14 | [build-system] | ||
15 | requires = ["poetry-core>=1.0.0"] | ||
16 | build-backend = "poetry.core.masonry.api" \ No newline at end of file | ||
diff --git a/overlays/smartprom/setup.py b/overlays/smartprom/setup.py deleted file mode 100644 index c30fc557..00000000 --- a/overlays/smartprom/setup.py +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | from setuptools import setup | ||
2 | |||
3 | setup(name='@pname@', | ||
4 | version='@version@', | ||
5 | packages=['@pname@'], | ||
6 | entry_points={ | ||
7 | 'console_scripts': [ | ||
8 | '@pname@=@pname@.__main__:main', | ||
9 | ], | ||
10 | } | ||
11 | ) | ||