blob: e3a549fd5d03a5baa797ea5ba80045302aa01b35 (
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
50
51
52
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pyusb,
influxdb-client,
pyserial,
pytestCheckHook,
udevCheckHook,
}:
buildPythonPackage rec {
pname = "openant-unstable";
version = "1.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "Tigge";
repo = "openant";
tag = "v${version}";
hash = "sha256-wDtHlkVyD7mMDXZ4LGMgatr9sSlQKVbgkYsKvHGr9Pc=";
};
nativeBuildInputs = [
setuptools
udevCheckHook
];
postInstall = ''
install -dm755 "$out/etc/udev/rules.d"
install -m644 resources/42-ant-usb-sticks.rules "$out/etc/udev/rules.d/99-ant-usb-sticks.rules"
'';
propagatedBuildInputs = [ pyusb ];
optional-dependencies = {
serial = [ pyserial ];
influx = [ influxdb-client ];
};
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "openant" ];
meta = {
homepage = "https://github.com/Tigge/openant";
description = "ANT and ANT-FS Python Library";
mainProgram = "openant";
license = lib.licenses.mit;
};
}
|