nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytestCheckHook,
7}:
8
9let
10 pname = "rpi-bad-power";
11 version = "0.1.0";
12in
13buildPythonPackage {
14 inherit pname version;
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "shenxn";
19 repo = "rpi-bad-power";
20 rev = "v${version}";
21 hash = "sha256:1yvfz28blq4fdnn614n985vbs5hcw1gm3i9am53k410sfs7ilvkk";
22 };
23
24 nativeBuildInputs = [ setuptools ];
25
26 pythonImportsCheck = [ "rpi_bad_power" ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 meta = {
31 description = "Python library to detect bad power supply on Raspberry Pi";
32 homepage = "https://github.com/shenxn/rpi-bad-power";
33 license = lib.licenses.mit;
34 maintainers = with lib.maintainers; [ hexa ];
35 platforms = lib.platforms.linux;
36 };
37}