depot/third_party/nixpkgs/pkgs/development/python-modules/prometheus-client/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

42 lines
1,012 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
twisted,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "prometheus-client";
version = "0.21.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "prometheus";
repo = "client_python";
rev = "refs/tags/v${version}";
hash = "sha256-LrCBCfIcpxNjy/yjwCG4J34eJO4AdUr21kp9FBwSeAY=";
};
build-system = [ setuptools ];
optional-dependencies.twisted = [ twisted ];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies);
pythonImportsCheck = [ "prometheus_client" ];
meta = with lib; {
description = "Prometheus instrumentation library for Python applications";
homepage = "https://github.com/prometheus/client_python";
changelog = "https://github.com/prometheus/client_python/releases/tag/v${version}";
license = licenses.asl20;
maintainers = [ ];
};
}