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