diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/prometheus-api-client/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/prometheus-api-client/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/prometheus-api-client/default.nix b/nixpkgs/pkgs/development/python-modules/prometheus-api-client/default.nix new file mode 100644 index 000000000000..842b4c0b22ab --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/prometheus-api-client/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, dateparser +, httmock +, matplotlib +, numpy +, pandas +, requests +}: + +buildPythonPackage rec { + pname = "prometheus-api-client"; + version = "0.5.5"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "4n4nd"; + repo = "prometheus-api-client-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-tUu0+ZUOFxBCj//lHhNm88rhFbS01j1x508+nqIkCfQ="; + }; + + propagatedBuildInputs = [ + dateparser + matplotlib + numpy + pandas + requests + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + checkInputs = [ + httmock + ]; + + disabledTestPaths = [ + "tests/test_prometheus_connect.py" + ]; + + pythonImportsCheck = [ + "prometheus_api_client" + ]; + + + meta = with lib; { + description = "A Python wrapper for the Prometheus HTTP API"; + longDescription = '' + The prometheus-api-client library consists of multiple modules which + assist in connecting to a Prometheus host, fetching the required metrics + and performing various aggregation operations on the time series data. + ''; + homepage = "https://github.com/4n4nd/prometheus-api-client-python"; + changelog = "https://github.com/4n4nd/prometheus-api-client-python/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ azahi ]; + }; +} |