Skip to content

Commit

Permalink
python3Packages.amshan: init at 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornfor committed Jan 12, 2025
1 parent c79c52d commit b41c6e7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/development/python-modules/amshan/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
construct,
paho-mqtt,
pyserial-asyncio,
}:

buildPythonPackage rec {
pname = "amshan";
version = "2.1.1";
pyproject = true;

src = fetchFromGitHub {
owner = "toreamun";
repo = "amshan";
rev = version;
hash = "sha256-aw0wTqb2s84STVUN55h6L926pXwaMSppBCfXZVb87w0=";
};

nativeBuildInputs = [
setuptools
wheel
];

propagatedBuildInputs = [
construct
paho-mqtt
pyserial-asyncio
];

pythonImportsCheck = [ "han" ];

meta = {
description = "Decode smart power meter data stream of Cosem HDLC frames used by MBUS";
longDescription = ''
The package has special support of formats for Aidon, Kaifa and Kamstrup
meters used in Norway and Sweden (AMS HAN).
'';
homepage = "https://github.com/toreamun/amshan";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bjornfor ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ self: super: with self; {

amqtt = callPackage ../development/python-modules/amqtt { };

amshan = callPackage ../development/python-modules/amshan { };

anchor-kr = callPackage ../development/python-modules/anchor-kr { };

ancp-bids = callPackage ../development/python-modules/ancp-bids { };
Expand Down

0 comments on commit b41c6e7

Please sign in to comment.