From 521809f34512b85936169928d0c4ca1e5151ca92 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Oct 2022 18:15:44 +0200 Subject: [PATCH] python310Packages.dlms-cosem: init at 21.3.2 --- .../python-modules/dlms-cosem/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/dlms-cosem/default.nix diff --git a/pkgs/development/python-modules/dlms-cosem/default.nix b/pkgs/development/python-modules/dlms-cosem/default.nix new file mode 100644 index 000000000000..e6040fb7860a --- /dev/null +++ b/pkgs/development/python-modules/dlms-cosem/default.nix @@ -0,0 +1,51 @@ +{ lib +, asn1crypto +, attrs +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pyserial +, pytestCheckHook +, python-dateutil +, pythonOlder +, typing-extensions +}: + +buildPythonPackage rec { + pname = "dlms-cosem"; + version = "21.3.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "pwitab"; + repo = pname; + rev = "refs/tags/${version}"; + sha256 = "sha256-BrLanP+SIRRof15yzqwcDOxw92phbW7m9CfORz0xo7I="; + }; + + propagatedBuildInputs = [ + asn1crypto + attrs + cryptography + pyserial + python-dateutil + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "dlms_cosem" + ]; + + meta = with lib; { + description = "Python module to parse DLMS/COSEM"; + homepage = "https://github.com/pwitab/dlms-cosem"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 04c9ec2047cb..c4714ffe9a52 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2620,6 +2620,8 @@ self: super: with self; { dlinfo = callPackage ../development/python-modules/dlinfo { }; + dlms-cosem = callPackage ../development/python-modules/dlms-cosem { }; + dlx = callPackage ../development/python-modules/dlx { }; dmenu-python = callPackage ../development/python-modules/dmenu { };