git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108613 from fabaff/pymodbus
commit1f6ccd253a231449664a0fba6db75e2cf2b17480 authorSandro <sandro.jaeckel@gmail.com> dateThu 7 Jan 2021, 11:24 (6 years ago) parente246b9058c606a
3 files changed+64−3
pkgs/development/python-modules/pymodbus/default.nix+59 pkgs/servers/home-assistant/component-packages.nix+3−3 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/pymodbus/default.nixnew file+59
@@ -0,0 +1,59 @@
1+{ lib
2+, asynctest
3+, buildPythonPackage
4+, fetchFromGitHub
5+, mock
6+, pyserial
7+, pyserial-asyncio
8+, pytestCheckHook
9+, pythonOlder
10+, redis
11+, sqlalchemy
12+, tornado
13+, twisted
14+}:
15+
16+buildPythonPackage rec {
17+ pname = "pymodbus";
18+ version = "2.4.0";
19+
20+ src = fetchFromGitHub {
21+ owner = "riptideio";
22+ repo = pname;
23+ rev = "v${version}";
24+ sha256 = "0x0dv02shcc2yxxm9kvcbhip111sna74dvcfssxdzzy967vnq76v";
25+ };
26+
27+ # Twisted asynchronous version is not supported due to a missing dependency
28+ propagatedBuildInputs = [
29+ pyserial
30+ pyserial-asyncio
31+ tornado
32+ ];
33+
34+ checkInputs = [
35+ asynctest
36+ mock
37+ pyserial-asyncio
38+ pytestCheckHook
39+ redis
40+ sqlalchemy
41+ tornado
42+ twisted
43+ ];
44+
45+ pythonImportsCheck = [ "pymodbus" ];
46+
47+ meta = with lib; {
48+ description = "Python implementation of the Modbus protocol";
49+ longDescription = ''
50+ Pymodbus is a full Modbus protocol implementation using twisted,
51+ torndo or asyncio for its asynchronous communications core. It can
52+ also be used without any third party dependencies if a more
53+ lightweight project is needed.
54+ '';
55+ homepage = "https://github.com/riptideio/pymodbus";
56+ license = with licenses; [ bsd3 ];
57+ maintainers = with maintainers; [ fab ];
58+ };
59+}
pkgs/servers/home-assistant/component-packages.nix+3−3
@@ -258,7 +258,7 @@
258258 "fitbit" = ps: with ps; [ aiohttp-cors fitbit ];
259259 "fixer" = ps: with ps; [ ]; # missing inputs: fixerio
260260 "fleetgo" = ps: with ps; [ ]; # missing inputs: ritassist
261− "flexit" = ps: with ps; [ ]; # missing inputs: pyflexit pymodbus
261+ "flexit" = ps: with ps; [ pymodbus ]; # missing inputs: pyflexit
262262 "flic" = ps: with ps; [ ]; # missing inputs: pyflic-homeassistant
263263 "flick_electric" = ps: with ps; [ ]; # missing inputs: PyFlick
264264 "flo" = ps: with ps; [ ]; # missing inputs: aioflo
@@ -503,7 +503,7 @@
503503 "mjpeg" = ps: with ps; [ ];
504504 "mobile_app" = ps: with ps; [ pynacl aiohttp-cors emoji hass-nabucasa pillow ];
505505 "mochad" = ps: with ps; [ ]; # missing inputs: pymochad
506− "modbus" = ps: with ps; [ ]; # missing inputs: pymodbus
506+ "modbus" = ps: with ps; [ pymodbus ];
507507 "modem_callerid" = ps: with ps; [ ]; # missing inputs: basicmodem
508508 "mold_indicator" = ps: with ps; [ ];
509509 "monoprice" = ps: with ps; [ ]; # missing inputs: pymonoprice
@@ -785,7 +785,7 @@
785785 "statistics" = ps: with ps; [ sqlalchemy ];
786786 "statsd" = ps: with ps; [ statsd ];
787787 "steam_online" = ps: with ps; [ ]; # missing inputs: steamodd
788− "stiebel_eltron" = ps: with ps; [ ]; # missing inputs: pymodbus pystiebeleltron
788+ "stiebel_eltron" = ps: with ps; [ pymodbus ]; # missing inputs: pystiebeleltron
789789 "stookalert" = ps: with ps; [ ]; # missing inputs: stookalert
790790 "stream" = ps: with ps; [ aiohttp-cors av ];
791791 "streamlabswater" = ps: with ps; [ ]; # missing inputs: streamlabswater
pkgs/top-level/python-packages.nix+2
@@ -5437,6 +5437,8 @@ in {
54375437
54385438 pymetno = callPackage ../development/python-modules/pymetno { };
54395439
5440+ pymodbus = callPackage ../development/python-modules/pymodbus { };
5441+
54405442 pymongo = callPackage ../development/python-modules/pymongo { };
54415443
54425444 pympler = callPackage ../development/python-modules/pympler { };