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