1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5}: 6 7buildPythonPackage rec { 8 pname = "apcaccess"; 9 version = "0.0.13"; 10 11 src = fetchFromGitHub { 12 owner = "flyte"; 13 repo = "apcaccess"; 14 rev = version; 15 hash = "sha256-XLoNRh6MgXCfRtWD9NpVZSyroW6E9nRYw6Grxa+AQkc="; 16 }; 17 18 postPatch = '' 19 substituteInPlace setup.py \ 20 --replace "setup_requires='pytest-runner'," "" 21 ''; 22 23 pythonImportsCheck = [ 24 "apcaccess" 25 ]; 26 27 nativeCheckInputs = [ 28 pytestCheckHook 29 ]; 30 31 meta = with lib; { 32 description = "Library offers programmatic access to the status information provided by apcupsd over its Network Information Server"; 33 homepage = "https://github.com/flyte/apcaccess"; 34 license = licenses.mit; 35 maintainers = with maintainers; [ uvnikita ]; 36 }; 37}