From ea81ce6ff5f700f77c0f2d08e375a0301583d118 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Nov 2021 22:37:54 +0100 Subject: [PATCH] python3Packages.uptime-kuma-monitor: init at 1.0.0 --- .../uptime-kuma-monitor/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/uptime-kuma-monitor/default.nix diff --git a/pkgs/development/python-modules/uptime-kuma-monitor/default.nix b/pkgs/development/python-modules/uptime-kuma-monitor/default.nix new file mode 100644 index 000000000000..f689942abf93 --- /dev/null +++ b/pkgs/development/python-modules/uptime-kuma-monitor/default.nix @@ -0,0 +1,40 @@ +{ lib +, requests +, buildPythonPackage +, fetchPypi +, prometheus-client +, pythonOlder +}: + +buildPythonPackage rec { + pname = "uptime-kuma-monitor"; + version = "1.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "uptime_kuma_monitor"; + inherit version; + sha256 = "0zi4856hj5ar4yidh7366kx3xnh8qzydw9z8vlalcn98jf3jlnk9"; + }; + + propagatedBuildInputs = [ + requests + prometheus-client + ]; + + # Project has no test + doCheck = false; + + pythonImportsCheck = [ + "uptime_kuma_monitor" + ]; + + meta = with lib; { + description = "Python wrapper around UptimeKuma /metrics endpoint"; + homepage = "https://github.com/meichthys/utptime_kuma_monitor"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e7b7e9017fac..9c241c939c9f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9634,6 +9634,8 @@ in { uptime = callPackage ../development/python-modules/uptime { }; + uptime-kuma-monitor = callPackage ../development/python-modules/uptime-kuma-monitor { }; + uranium = callPackage ../development/python-modules/uranium { }; uritemplate = callPackage ../development/python-modules/uritemplate { };