From 29dad86f17c3f940d9f53495b59a3c93314add67 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Wed, 5 Jun 2024 08:15:12 +0800 Subject: [PATCH] python312Packages.python-logging-loki: init at 0.3.1 --- .../python-logging-loki/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/python-logging-loki/default.nix diff --git a/pkgs/development/python-modules/python-logging-loki/default.nix b/pkgs/development/python-modules/python-logging-loki/default.nix new file mode 100644 index 000000000000..fe22ed58b7c6 --- /dev/null +++ b/pkgs/development/python-modules/python-logging-loki/default.nix @@ -0,0 +1,49 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + pytestCheckHook, + rfc3339, + requests, + freezegun, +}: + +buildPythonPackage rec { + pname = "python-logging-loki"; + version = "0.3.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "GreyZmeem"; + repo = "python-logging-loki"; + rev = "refs/tags/v${version}"; + hash = "sha256-1qHuv+xzATo11au+QAhD1lHcLJtnVKZDdQDGohHUhiI="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + rfc3339 + requests + ]; + + nativeCheckInputs = [ + pytestCheckHook + freezegun + ]; + + # ValueError + # Considering that the package has not been updated since 2019, it is likely that this test is broken + disabledTests = [ "test_can_build_tags_from_converting_dict" ]; + + pythonImportsCheck = [ "logging_loki" ]; + + meta = { + description = "Python logging handler for Loki"; + homepage = "https://github.com/GreyZmeem/python-logging-loki"; + changelog = "https://github.com/GreyZmeem/python-logging-loki/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ moraxyc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 39101401e482..7f4fe4f4b34a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12441,6 +12441,8 @@ self: super: with self; { python-linux-procfs = callPackage ../development/python-modules/python-linux-procfs { }; + python-logging-loki = callPackage ../development/python-modules/python-logging-loki { }; + python-logstash = callPackage ../development/python-modules/python-logstash { }; python-louvain = callPackage ../development/python-modules/python-louvain { };