nixpkgs-suyu/pkgs/development/python-modules/amqtt/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

82 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, docopt
, fetchFromGitHub
, fetchpatch
, hypothesis
, passlib
, poetry-core
, pytest-logdog
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, pyyaml
, setuptools
, transitions
, websockets
}:
buildPythonPackage rec {
pname = "amqtt";
version = "unstable-2022-05-29";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Yakifo";
repo = pname;
rev = "09ac98d39a711dcff0d8f22686916e1c2495144b";
hash = "sha256-8T1XhBSOiArlUQbQ41LsUogDgOurLhf+M8mjIrrAC4s=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'transitions = "^0.8.0"' 'transitions = "*"'
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
docopt
passlib
pyyaml
setuptools
transitions
websockets
];
nativeCheckInputs = [
hypothesis
pytest-logdog
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [
"--asyncio-mode=auto"
];
disabledTestPaths = [
# Test are not ported from hbmqtt yet
"tests/test_client.py"
];
preCheck = ''
# Some tests need amqtt
export PATH=$out/bin:$PATH
'';
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 ];
};
}