1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, nose 5, pythonOlder 6}: 7 8buildPythonPackage rec { 9 pname = "smbus2"; 10 version = "0.4.1"; 11 12 disabled = pythonOlder "3.6"; 13 14 src = fetchFromGitHub { 15 owner = "kplindegaard"; 16 repo = pname; 17 rev = version; 18 sha256 = "0xgqs7bzhr8y3irc9gq3dnw1l3f5gc1yv4r2v4qxj95i3vvzpg5s"; 19 }; 20 21 checkInputs = [ 22 nose 23 ]; 24 25 checkPhase = '' 26 runHook preCheck 27 nosetests 28 runHook postCheck 29 ''; 30 31 pythonImportsCheck = [ 32 "smbus2" 33 ]; 34 35 meta = with lib; { 36 description = "Drop-in replacement for smbus-cffi/smbus-python"; 37 homepage = "https://smbus2.readthedocs.io/"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ fab ]; 40 }; 41}