blob: 99f90e17b028a0c391294f340c0f91ec723d9568 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, aiohttp
, buildPythonPackage
, click
, fetchFromGitHub
, prompt-toolkit
, pycryptodome
, pydantic
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "pykoplenti";
version = "1.2.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "stegm";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-2sGkHCIGo1lzLurvQBmq+16sodAaK8v+mAbIH/Gd3+E=";
};
nativeBuildInputs = [
setuptools
];
postPatch = ''
# remove with 1.1.0
substituteInPlace setup.cfg \
--replace 'version = unreleased' 'version = ${version}'
'';
propagatedBuildInputs = [
aiohttp
pycryptodome
pydantic
];
passthru.optional-dependencies = {
CLI = [
click
prompt-toolkit
];
};
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "pykoplenti" ];
meta = with lib; {
description = "Python REST client API for Kostal Plenticore Inverters";
homepage = "https://github.com/stegm/pykoplenti/";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}
|