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