1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 fetchpatch2, 7 setuptools, 8 aiohttp, 9 incremental, 10 systembridgemodels, 11 pytest-aiohttp, 12 pytest-socket, 13 pytestCheckHook, 14}: 15 16buildPythonPackage rec { 17 pname = "systembridgeconnector"; 18 version = "4.0.4"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.11"; 22 23 src = fetchFromGitHub { 24 owner = "timmo001"; 25 repo = "system-bridge-connector"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-Guh9qbRLp+b2SuFgBx7jf16vRShuHJBi3WOVn9Akce8="; 28 }; 29 30 patches = [ 31 (fetchpatch2 { 32 url = "https://github.com/timmo001/system-bridge-connector/commit/25aa172775ee983dc4a29b8dda880aefbad70040.patch"; 33 hash = "sha256-PedW1S1gZmWkS4sJBqSAx3aoA1KppYS5Xlhoaxqkcd4="; 34 }) 35 ]; 36 37 postPatch = '' 38 substituteInPlace systembridgeconnector/_version.py \ 39 --replace-fail ", dev=0" "" 40 ''; 41 42 nativeBuildInputs = [ setuptools ]; 43 44 propagatedBuildInputs = [ 45 aiohttp 46 incremental 47 systembridgemodels 48 ]; 49 50 pythonImportsCheck = [ "systembridgeconnector" ]; 51 52 nativeCheckInputs = [ 53 pytest-aiohttp 54 pytest-socket 55 pytestCheckHook 56 ]; 57 58 disabledTests = [ 59 # ConnectionClosedException: Connection closed to server 60 "test_get_files" 61 ]; 62 63 meta = { 64 changelog = "https://github.com/timmo001/system-bridge-connector/releases/tag/${version}"; 65 description = "This is the connector package for the System Bridge project"; 66 homepage = "https://github.com/timmo001/system-bridge-connector"; 67 license = lib.licenses.asl20; 68 maintainers = with lib.maintainers; [ dotlambda ]; 69 }; 70}