depot/third_party/nixpkgs/pkgs/development/python-modules/dsmr-parser/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
dlms-cosem,
fetchFromGitHub,
pyserial,
pyserial-asyncio,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
pytz,
tailer,
}:
buildPythonPackage rec {
pname = "dsmr-parser";
version = "1.4.1";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ndokter";
repo = "dsmr_parser";
rev = "refs/tags/v${version}";
hash = "sha256-lP4KU3k7dGYHv24uNffTNe60u11Xg7YG05F/joVZu/Q=";
};
propagatedBuildInputs = [
dlms-cosem
pyserial
pyserial-asyncio
pytz
tailer
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_receive_packet" ];
pythonImportsCheck = [ "dsmr_parser" ];
meta = with lib; {
description = "Python module to parse Dutch Smart Meter Requirements (DSMR)";
mainProgram = "dsmr_console";
homepage = "https://github.com/ndokter/dsmr_parser";
changelog = "https://github.com/ndokter/dsmr_parser/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}