2021-05-05 08:09:49 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, docopt
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hypothesis
|
|
|
|
, passlib
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
, transitions
|
|
|
|
, websockets
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "amqtt";
|
2021-08-11 23:04:30 +01:00
|
|
|
version = "0.10.0";
|
2021-05-05 08:09:49 +01:00
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Yakifo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-11 23:04:30 +01:00
|
|
|
sha256 = "sha256-27LmNR1KC8w3zRJ7YBlBolQ4Q70ScTPqypMCpU6fO+I=";
|
2021-05-05 08:09:49 +01:00
|
|
|
};
|
|
|
|
|
2021-10-10 05:27:28 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'websockets = "^9.0"' 'websockets = "^10.0"'
|
|
|
|
'';
|
|
|
|
|
2021-05-05 08:09:49 +01:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docopt
|
|
|
|
passlib
|
|
|
|
pyyaml
|
|
|
|
transitions
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
hypothesis
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Test are not ported from hbmqtt yet
|
|
|
|
"tests/test_cli.py"
|
|
|
|
"tests/test_client.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Requires network access
|
|
|
|
"test_connect_tcp"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "amqtt" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python MQTT client and broker implementation";
|
|
|
|
homepage = "https://amqtt.readthedocs.io/";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|