1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "smbus2"; 10 version = "0.4.3"; 11 format = "setuptools"; 12 13 disabled = pythonOlder "3.6"; 14 15 src = fetchFromGitHub { 16 owner = "kplindegaard"; 17 repo = pname; 18 rev = "refs/tags/${version}"; 19 hash = "sha256-tjJurJzDn0ATiYY3Xo66lwUs98/7ZLG3d4+h1prVHAI="; 20 }; 21 22 nativeCheckInputs = [ 23 pytestCheckHook 24 ]; 25 26 pythonImportsCheck = [ 27 "smbus2" 28 ]; 29 30 meta = with lib; { 31 description = "Drop-in replacement for smbus-cffi/smbus-python"; 32 homepage = "https://smbus2.readthedocs.io/"; 33 changelog = "https://github.com/kplindegaard/smbus2/blob/${version}/CHANGELOG.md"; 34 license = licenses.mit; 35 maintainers = with maintainers; [ fab ]; 36 }; 37}