nixpkgs-suyu/pkgs/development/python-modules/apcaccess/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

39 lines
860 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 ];
};
}