Files
nixpkgs/pkgs/development/python-modules/dsmr-parser/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

57 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
dlms-cosem,
fetchFromGitHub,
pyserial,
pyserial-asyncio-fast,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
pytz,
setuptools,
tailer,
}:
buildPythonPackage rec {
pname = "dsmr-parser";
version = "1.4.3";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ndokter";
repo = "dsmr_parser";
tag = "v${version}";
hash = "sha256-jBrcliN63isFKMqgaFIAPP/ALDdtL/O9mCN8Va+g+NE=";
};
pythonRelaxDeps = [ "dlms_cosem" ];
build-system = [ setuptools ];
dependencies = [
dlms-cosem
pyserial
pyserial-asyncio-fast
pytz
tailer
];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_receive_packet" ];
pythonImportsCheck = [ "dsmr_parser" ];
meta = {
description = "Python module to parse Dutch Smart Meter Requirements (DSMR)";
homepage = "https://github.com/ndokter/dsmr_parser";
changelog = "https://github.com/ndokter/dsmr_parser/releases/tag/${src.tag}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
mainProgram = "dsmr_console";
};
}