Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / openant / default.nix
blob0a655030a37d9dae47c2f90723319821e49002b3
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , setuptools
6 , pyusb
7 , influxdb-client
8 , pyserial
9 , pytestCheckHook
12 buildPythonPackage rec {
13   pname = "openant-unstable";
14   version = "1.3.1";
15   pyproject = true;
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "Tigge";
21     repo = "openant";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-wDtHlkVyD7mMDXZ4LGMgatr9sSlQKVbgkYsKvHGr9Pc=";
24   };
26   nativeBuildInputs = [
27     setuptools
28   ];
30   postInstall = ''
31     install -dm755 "$out/etc/udev/rules.d"
32     install -m644 resources/42-ant-usb-sticks.rules "$out/etc/udev/rules.d/99-ant-usb-sticks.rules"
33   '';
35   propagatedBuildInputs = [ pyusb ];
37   passthru.optional-dependencies = {
38     serial = [
39       pyserial
40     ];
41     influx = [
42       influxdb-client
43     ];
44   };
46   nativeCheckInputs = [
47     pytestCheckHook
48   ];
50   pythonImportsCheck = [
51     "openant"
52   ];
54   meta = with lib; {
55     homepage = "https://github.com/Tigge/openant";
56     description = "ANT and ANT-FS Python Library";
57     mainProgram = "openant";
58     license = licenses.mit;
59   };