summaryrefslogtreecommitdiff
path: root/overlays/smartprom
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/smartprom')
-rw-r--r--overlays/smartprom/default.nix19
-rw-r--r--overlays/smartprom/setup.py11
2 files changed, 30 insertions, 0 deletions
diff --git a/overlays/smartprom/default.nix b/overlays/smartprom/default.nix
new file mode 100644
index 00000000..0dd0771b
--- /dev/null
+++ b/overlays/smartprom/default.nix
@@ -0,0 +1,19 @@
1{ final, prev, flakeInputs, sources, ... }:
2{
3 smartprom = flakeInputs.mach-nix.lib.${final.system}.buildPythonPackage rec {
4 inherit (sources.smartprom) src pname version;
5 ignoreDataOutdated = true;
6
7 prePatch = ''
8 mkdir smartprom
9 mv smartprom.py smartprom/__main__.py
10 echo >> smartprom/__init__.py
11
12 substituteAll ${./setup.py} ./setup.py
13 '';
14
15 requirements = ''
16 prometheus_client
17 '';
18 };
19}
diff --git a/overlays/smartprom/setup.py b/overlays/smartprom/setup.py
new file mode 100644
index 00000000..c30fc557
--- /dev/null
+++ b/overlays/smartprom/setup.py
@@ -0,0 +1,11 @@
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)