48 lines
989 B
Nix
48 lines
989 B
Nix
{
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
lib,
|
|
hatchling,
|
|
aiohttp,
|
|
yarl,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "qbusmqttapi";
|
|
version = "1.4.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Qbus-iot";
|
|
repo = "qbusmqttapi";
|
|
tag = "v${version}";
|
|
hash = "sha256-8TNtfBxJcSwlcAgKF6Gvn+e4NGbOIE3JWBAgFKmNyKA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Upstream uses a placeholder version in pyproject.toml
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail '"0.0.0"' '"${version}"'
|
|
'';
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
dependencies = [
|
|
aiohttp
|
|
yarl
|
|
];
|
|
|
|
pythonImportsCheck = [ "qbusmqttapi" ];
|
|
|
|
# upstream has no tests
|
|
doCheck = false;
|
|
|
|
meta = {
|
|
description = "MQTT API for Qbus Home Automation";
|
|
homepage = "https://github.com/Qbus-iot/qbusmqttapi";
|
|
changelog = "https://github.com/Qbus-iot/qbusmqttapi/releases/tag/${src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|