1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pyserial, 6 pytestCheckHook, 7 pythonOlder, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "umodbus"; 13 version = "1.0.4"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "AdvancedClimateSystems"; 20 repo = "uModbus"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-5IXadb5mjrMwr+L9S1iMN5kba5VGrzYt1p8nBvvLCh4="; 23 }; 24 25 propagatedBuildInputs = [ pyserial ]; 26 27 __darwinAllowLocalNetworking = true; 28 29 nativeCheckInputs = [ pytestCheckHook ]; 30 31 pythonImportsCheck = [ "umodbus" ]; 32 33 meta = with lib; { 34 description = "Implementation of the Modbus protocol"; 35 homepage = "https://github.com/AdvancedClimateSystems/uModbus/"; 36 license = with licenses; [ mpl20 ]; 37 maintainers = with maintainers; [ fab ]; 38 }; 39}