about summary refs log tree commit diff
path: root/pkgs/development/python-modules/rpi-bad-power/default.nix
blob: 5a73ee4a1bf1ff8347c506e42b9ac2e58833a6f1 (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
39
40
41
42
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pytestCheckHook
}:

let
  pname = "rpi-bad-power";
  version = "0.1.0";
in
buildPythonPackage {
  inherit pname version;
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "shenxn";
    repo = pname;
    rev = "v${version}";
    hash = "sha256:1yvfz28blq4fdnn614n985vbs5hcw1gm3i9am53k410sfs7ilvkk";
  };

  nativeBuildInputs = [
    setuptools
  ];

  pythonImportsCheck = [
    "rpi_bad_power"
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Python library to detect bad power supply on Raspberry Pi";
    homepage = "https://github.com/shenxn/rpi-bad-power";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
    platforms = platforms.linux;
  };
}