1{
2 aiohttp,
3 buildPythonPackage,
4 doCheck ? false, # cyclic dependency with pymodbus
5 fetchFromGitHub,
6 lib,
7 poetry-core,
8 prompt-toolkit,
9 pygments,
10 pymodbus,
11 pymodbus-repl,
12 pytest-cov-stub,
13 pytestCheckHook,
14 tabulate,
15 typer,
16}:
17
18buildPythonPackage rec {
19 pname = "pymodbus-repl";
20 version = "2.0.5";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "pymodbus-dev";
25 repo = "repl";
26 tag = version;
27 hash = "sha256-jGoYp2nDWMWMX8n0aaG/YP+rQcj2npFbhdy7T1qxByc=";
28 };
29
30 build-system = [ poetry-core ];
31
32 pythonRelaxDeps = [
33 "typer"
34 ];
35
36 dependencies = [
37 aiohttp
38 prompt-toolkit
39 pygments
40 tabulate
41 typer
42 ];
43
44 pythonImportsCheck = [ "pymodbus_repl" ];
45
46 inherit doCheck;
47
48 nativeCheckInputs = [
49 pymodbus
50 pytest-cov-stub
51 pytestCheckHook
52 ];
53
54 passthru.tests = {
55 # currently expected to fail: https://github.com/pymodbus-dev/repl/pull/26
56 pytest = pymodbus-repl.override { doCheck = true; };
57 };
58
59 meta = {
60 changelog = "https://github.com/pymodbus-dev/repl/releases/tag/${src.tag}";
61 description = "REPL client and server for pymodbus";
62 homepage = "https://github.com/pymodbus-dev/repl";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ dotlambda ];
65 };
66}