2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
2022-01-19 23:45:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "rpi_bad_power" ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|