about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/apcaccess/default.nix
blob: e6d6d32eb353aca0e87c76f750021e41b3db1c69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ 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";
    homepage = "https://github.com/flyte/apcaccess";
    license = licenses.mit;
    maintainers = with maintainers; [ uvnikita ];
  };
}