summaryrefslogtreecommitdiff
path: root/overlays/smartprom
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/smartprom')
-rw-r--r--overlays/smartprom/default.nix36
-rw-r--r--overlays/smartprom/poetry.lock21
-rw-r--r--overlays/smartprom/pyproject.toml16
-rw-r--r--overlays/smartprom/setup.py11
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, ... }:
2let 2{
3 inherit (prev.stdenv.targetPlatform) system; 3 smartprom =
4in { 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]]
4name = "prometheus-client"
5version = "0.16.0"
6description = "Python client for the Prometheus monitoring system."
7category = "main"
8optional = false
9python-versions = ">=3.6"
10files = [
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]
16twisted = ["twisted"]
17
18[metadata]
19lock-version = "2.0"
20python-versions = ">=3.10.0,<3.12"
21content-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]
2name = "smartprom"
3version = "2.2.0"
4authors = []
5description = ""
6
7[tool.poetry.scripts]
8smartprom = "smartprom.__main__:main"
9
10[tool.poetry.dependencies]
11python = ">=3.10.0,<3.12"
12prometheus-client = "^0.16.0"
13
14[build-system]
15requires = ["poetry-core>=1.0.0"]
16build-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 @@
1from setuptools import setup
2
3setup(name='@pname@',
4 version='@version@',
5 packages=['@pname@'],
6 entry_points={
7 'console_scripts': [
8 '@pname@=@pname@.__main__:main',
9 ],
10 }
11)