nixpkgs-suyu/pkgs/development/python-modules/apcaccess/default.nix
Martin Weinelt 0215034f25 python3.pkgs: Migrate fetchers to use hash
when they already rely on SRI hashes.
2023-03-03 23:59:29 +01:00

37 lines
804 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "apcaccess";
version = "0.0.13";
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";
homepage = "https://github.com/flyte/apcaccess";
license = licenses.mit;
maintainers = with maintainers; [ uvnikita ];
};
}