depot/third_party/nixpkgs/pkgs/development/python-modules/apcaccess/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

36 lines
854 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "apcaccess";
version = "0.0.13";
format = "setuptools";
src = fetchFromGitHub {
owner = "flyte";
repo = "apcaccess";
rev = version;
hash = "sha256-XLoNRh6MgXCfRtWD9NpVZSyroW6E9nRYw6Grxa+AQkc=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "setup_requires='pytest-runner'," ""
'';
pythonImportsCheck = [ "apcaccess" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = with lib; {
description = "Library offers programmatic access to the status information provided by apcupsd over its Network Information Server";
mainProgram = "apcaccess";
homepage = "https://github.com/flyte/apcaccess";
license = licenses.mit;
maintainers = with maintainers; [ uvnikita ];
};
}