2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "apcaccess";
|
|
|
|
version = "0.0.13";
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|