2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "apcaccess";
|
|
|
|
version = "0.0.13";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "flyte";
|
|
|
|
repo = "apcaccess";
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-XLoNRh6MgXCfRtWD9NpVZSyroW6E9nRYw6Grxa+AQkc=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "setup_requires='pytest-runner'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"apcaccess"
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-28 06:52:43 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library offers programmatic access to the status information provided by apcupsd over its Network Information Server";
|
|
|
|
homepage = "https://github.com/flyte/apcaccess";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ uvnikita ];
|
|
|
|
};
|
|
|
|
}
|