blob: e9f6d41c2ff81fc109ecdb9236f323ad60a7b212 (
plain)
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
|
{
lib,
buildPythonPackage,
fetchFromGitLab,
pyserial,
pytestCheckHook,
setuptools,
six,
}:
buildPythonPackage (finalAttrs: {
pname = "aurorapy";
version = "0.3";
pyproject = true;
src = fetchFromGitLab {
owner = "energievalsabbia";
repo = "aurorapy";
tag = finalAttrs.version;
hash = "sha256-bc5i2x35sZXkCSJraTqX3Zc5B9eKL1qDh97/7ixyHLY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace-fail 'version="0.2.7"' 'version="${finalAttrs.version}"'
sed -i "/from past.builtins import map/d" aurorapy/client.py
'';
build-system = [ setuptools ];
pythonRemoveDeps = [ "future" ];
dependencies = [ pyserial ];
nativeCheckInputs = [
pytestCheckHook
six
];
pythonImportsCheck = [ "aurorapy" ];
meta = {
description = "Implementation of the communication protocol for Power-One Aurora inverters";
homepage = "https://gitlab.com/energievalsabbia/aurorapy";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})
|