summaryrefslogtreecommitdiff
path: root/overlays/smartprom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-09-13 10:29:35 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-09-13 10:29:35 +0200
commitb931543508377c0e48a6801e4ea217eb523e2b03 (patch)
tree373c8ab46c6e78cb69654d816fadf8d6fef1fd28 /overlays/smartprom
parent92dab2dbad09bee9698fc0a9734140af37ca550a (diff)
downloadnixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar.gz
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar.bz2
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.tar.xz
nixos-b931543508377c0e48a6801e4ea217eb523e2b03.zip
...
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)