diff options
Diffstat (limited to 'pkgs/development/python-modules/prometrix/default.nix')
-rw-r--r-- | pkgs/development/python-modules/prometrix/default.nix | 67 |
1 files changed, 38 insertions, 29 deletions
diff --git a/pkgs/development/python-modules/prometrix/default.nix b/pkgs/development/python-modules/prometrix/default.nix index 58b3ac27361e3..850ee8e55be63 100644 --- a/pkgs/development/python-modules/prometrix/default.nix +++ b/pkgs/development/python-modules/prometrix/default.nix @@ -1,36 +1,43 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, boto3 -, botocore -, dateparser -, matplotlib -, numpy -, pandas -, poetry-core -, prometheus-api-client -, pydantic_1 -, requests +{ + lib, + boto3, + botocore, + buildPythonPackage, + dateparser, + fetchFromGitHub, + matplotlib, + numpy, + pandas, + poetry-core, + prometheus-api-client, + pydantic, + pythonRelaxDepsHook, + requests, }: buildPythonPackage rec { pname = "prometrix"; - version = "unstable-2024-02-20"; - format = "pyproject"; + version = "0.1.18-unstable-2024-04-30"; + pyproject = true; src = fetchFromGitHub { owner = "robusta-dev"; repo = "prometrix"; - rev = "ab2dad2192ed3df91c1a25446a4f54b8f2f6742f"; - hash = "sha256-/72Qkd2BojYgiQi5rq7dVsEje7M0aQQXhenvIM7lSy4="; + # https://github.com/robusta-dev/prometrix/issues/19 + rev = "35128847d46016b88455e0a98f0eeec08d042107"; + hash = "sha256-g8ZqgL9ETVwpKLMQS7s7A4GpSGfaFEDLOr8JBvFl2C4="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail 'pydantic = "^1.8.1"' 'pydantic = "*"' - ''; + pythonRelaxDeps = [ + "pydantic" + "urllib3" + ]; + + build-system = [ poetry-core ]; + + nativeBuildInputs = [ pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ boto3 botocore dateparser @@ -38,17 +45,15 @@ buildPythonPackage rec { numpy pandas prometheus-api-client - pydantic_1 + pydantic requests ]; - nativeBuildInputs = [ - poetry-core - ]; + # Fixture is missing + # https://github.com/robusta-dev/prometrix/issues/9 + doCheck = false; - pythonImportsCheck = [ - "prometrix" - ]; + pythonImportsCheck = [ "prometrix" ]; meta = with lib; { description = "Unified Prometheus client"; @@ -56,7 +61,11 @@ buildPythonPackage rec { This Python package provides a unified Prometheus client that can be used to connect to and query various types of Prometheus instances. ''; + homepage = "https://github.com/robusta-dev/prometrix"; license = licenses.mit; maintainers = with maintainers; [ azahi ]; + # prometheus-api-client 0.5.5 is not working + # https://github.com/robusta-dev/prometrix/issues/14 + broken = versionAtLeast prometheus-api-client.version "0.5.3"; }; } |