1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #120118 from fabaff/dsmr-parser

This commit is contained in:
Martin Weinelt 2021-04-22 00:34:04 +02:00 committed by GitHub
commit 61ecd7c2cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 79 additions and 1 deletions

View file

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pyserial
, pyserial-asyncio
, pytestCheckHook
, pytz
, tailer
}:
buildPythonPackage rec {
pname = "dsmr-parser";
version = "0.29";
src = fetchFromGitHub {
owner = "ndokter";
repo = "dsmr_parser";
rev = "v${version}";
sha256 = "11d6cwmabzc8p6jkqwj72nrj7p6cxbvr0x3jdrxyx6zki8chyw4p";
};
propagatedBuildInputs = [
pyserial
pyserial-asyncio
pytz
tailer
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "dsmr_parser" ];
meta = with lib; {
description = "Python module to parse Dutch Smart Meter Requirements (DSMR)";
homepage = "https://github.com/ndokter/dsmr_parser";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
}:
buildPythonPackage rec {
pname = "tailer";
version = "0.4.1";
src = fetchFromGitHub {
owner = "six8";
repo = "pytailer";
rev = version;
sha256 = "1s5p5m3q9k7r1m0wx5wcxf20xzs0rj14qwg1ydwhf6adr17y2w5y";
};
checkPhase = ''
runHook preCheck
${python.interpreter} -m doctest -v src/tailer/__init__.py
runHook postCheck
'';
pythonImportsCheck = [ "tailer" ];
meta = with lib; {
description = "Python implementation implementation of GNU tail and head";
homepage = "https://github.com/six8/pytailer";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -187,7 +187,7 @@
"doorbird" = ps: with ps; [ aiohttp-cors ]; # missing inputs: doorbirdpy
"dovado" = ps: with ps; [ ]; # missing inputs: dovado
"downloader" = ps: with ps; [ ];
"dsmr" = ps: with ps; [ ]; # missing inputs: dsmr_parser
"dsmr" = ps: with ps; [ dsmr-parser ];
"dsmr_reader" = ps: with ps; [ aiohttp-cors paho-mqtt ];
"dte_energy_bridge" = ps: with ps; [ ];
"dublin_bus_transport" = ps: with ps; [ ];

View file

@ -228,6 +228,7 @@ in with py.pkgs; buildPythonApplication rec {
"devolo_home_control"
"dhcp"
"discovery"
"dsmr"
"econet"
"emulated_hue"
"esphome"

View file

@ -2109,6 +2109,8 @@ in {
ds4drv = callPackage ../development/python-modules/ds4drv { };
dsmr-parser = callPackage ../development/python-modules/dsmr-parser { };
dtopt = callPackage ../development/python-modules/dtopt { };
duckdb = callPackage ../development/python-modules/duckdb {
@ -8288,6 +8290,8 @@ in {
tahoma-api = callPackage ../development/python-modules/tahoma-api { };
tailer = callPackage ../development/python-modules/tailer { };
tarman = callPackage ../development/python-modules/tarman { };
tasklib = callPackage ../development/python-modules/tasklib { };