From b931543508377c0e48a6801e4ea217eb523e2b03 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 13 Sep 2022 10:29:35 +0200 Subject: ... --- overlays/smartprom/default.nix | 19 +++++++++++++++++++ overlays/smartprom/setup.py | 11 +++++++++++ 2 files changed, 30 insertions(+) create mode 100644 overlays/smartprom/default.nix create mode 100644 overlays/smartprom/setup.py (limited to 'overlays/smartprom') 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 @@ +{ final, prev, flakeInputs, sources, ... }: +{ + smartprom = flakeInputs.mach-nix.lib.${final.system}.buildPythonPackage rec { + inherit (sources.smartprom) src pname version; + ignoreDataOutdated = true; + + prePatch = '' + mkdir smartprom + mv smartprom.py smartprom/__main__.py + echo >> smartprom/__init__.py + + substituteAll ${./setup.py} ./setup.py + ''; + + requirements = '' + prometheus_client + ''; + }; +} 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 @@ +from setuptools import setup + +setup(name='@pname@', + version='@version@', + packages=['@pname@'], + entry_points={ + 'console_scripts': [ + '@pname@=@pname@.__main__:main', + ], + } +) -- cgit v1.2.3