2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
dlms-cosem,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pyserial,
|
2024-09-19 14:19:46 +00:00
|
|
|
pyserial-asyncio-fast,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
tailer,
|
2021-04-22 02:08:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dsmr-parser";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.4.2";
|
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-22 02:08:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ndokter";
|
|
|
|
repo = "dsmr_parser";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-NfleByW9MF7FS4n/cMv297382LucP6Z629CuA6chm20=";
|
2021-04-22 02:08:21 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonRelaxDeps = [ "dlms-cosem" ];
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-10-30 15:09:59 +00:00
|
|
|
dlms-cosem
|
2021-04-22 02:08:21 +00:00
|
|
|
pyserial
|
2024-09-19 14:19:46 +00:00
|
|
|
pyserial-asyncio-fast
|
2021-04-22 02:08:21 +00:00
|
|
|
pytz
|
|
|
|
tailer
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-04-22 02:08:21 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_receive_packet" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "dsmr_parser" ];
|
2021-04-22 02:08:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to parse Dutch Smart Meter Requirements (DSMR)";
|
|
|
|
homepage = "https://github.com/ndokter/dsmr_parser";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/ndokter/dsmr_parser/releases/tag/v${version}";
|
2021-04-22 02:08:21 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-09-19 14:19:46 +00:00
|
|
|
mainProgram = "dsmr_console";
|
2021-04-22 02:08:21 +00:00
|
|
|
};
|
|
|
|
}
|