{ lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, pythonOlder, }: buildPythonPackage rec { pname = "smbus2"; version = "0.5.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "kplindegaard"; repo = pname; rev = "refs/tags/${version}"; hash = "sha256-3ZAjviVLO/c27NzrPcWf6RlZYclYkmUmOskTP9TVbNM="; }; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "smbus2" ]; meta = with lib; { description = "Drop-in replacement for smbus-cffi/smbus-python"; homepage = "https://smbus2.readthedocs.io/"; changelog = "https://github.com/kplindegaard/smbus2/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }