Diff: https://github.com/powerapi-ng/powerapi/compare/refs/tags/v2.9.1...v2.10.0 Changelog: https://github.com/powerapi-ng/powerapi/releases/tag/v2.10.0
65 lines
1.3 KiB
Nix
65 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
influxdb-client,
|
|
kubernetes,
|
|
mock,
|
|
prometheus-client,
|
|
pymongo,
|
|
pytest-cov-stub,
|
|
pytest-timeout,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
pyzmq,
|
|
setproctitle,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "powerapi";
|
|
version = "2.10.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "powerapi-ng";
|
|
repo = "powerapi";
|
|
tag = "v${version}";
|
|
hash = "sha256-rn1qe0RwYuUR23CgzOOeiwe1wuFihnhQ9a6ALgSP/cQ=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
pyzmq
|
|
setproctitle
|
|
];
|
|
|
|
optional-dependencies = {
|
|
influxdb = [ influxdb-client ];
|
|
kubernetes = [ kubernetes ];
|
|
mongodb = [ pymongo ];
|
|
# opentsdb = [ opentsdb-py ];
|
|
prometheus = [ prometheus-client ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
mock
|
|
pytest-cov-stub
|
|
pytestCheckHook
|
|
pytest-timeout
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
|
|
|
pythonImportsCheck = [ "powerapi" ];
|
|
|
|
meta = {
|
|
description = "Python framework for building software-defined power meters";
|
|
homepage = "https://github.com/powerapi-ng/powerapi";
|
|
changelog = "https://github.com/powerapi-ng/powerapi/releases/tag/v${version}";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|