1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 lib, 5 hatchling, 6 aiohttp, 7 yarl, 8}: 9 10buildPythonPackage rec { 11 pname = "qbusmqttapi"; 12 version = "1.4.2"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "Qbus-iot"; 17 repo = "qbusmqttapi"; 18 tag = "v${version}"; 19 hash = "sha256-8TNtfBxJcSwlcAgKF6Gvn+e4NGbOIE3JWBAgFKmNyKA="; 20 }; 21 22 postPatch = '' 23 # Upstream uses a placeholder version in pyproject.toml 24 substituteInPlace pyproject.toml \ 25 --replace-fail '"0.0.0"' '"${version}"' 26 ''; 27 28 build-system = [ hatchling ]; 29 30 dependencies = [ 31 aiohttp 32 yarl 33 ]; 34 35 pythonImportsCheck = [ "qbusmqttapi" ]; 36 37 # upstream has no tests 38 doCheck = false; 39 40 meta = { 41 description = "MQTT API for Qbus Home Automation"; 42 homepage = "https://github.com/Qbus-iot/qbusmqttapi"; 43 changelog = "https://github.com/Qbus-iot/qbusmqttapi/releases/tag/${src.tag}"; 44 license = lib.licenses.mit; 45 maintainers = with lib.maintainers; [ dotlambda ]; 46 }; 47}