pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / openant / default.nix
blob34ccb51cd7d04572a30abd73c505ccc528b295e4
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   setuptools,
7   pyusb,
8   influxdb-client,
9   pyserial,
10   pytestCheckHook,
13 buildPythonPackage rec {
14   pname = "openant-unstable";
15   version = "1.3.1";
16   pyproject = true;
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "Tigge";
22     repo = "openant";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-wDtHlkVyD7mMDXZ4LGMgatr9sSlQKVbgkYsKvHGr9Pc=";
25   };
27   nativeBuildInputs = [ setuptools ];
29   postInstall = ''
30     install -dm755 "$out/etc/udev/rules.d"
31     install -m644 resources/42-ant-usb-sticks.rules "$out/etc/udev/rules.d/99-ant-usb-sticks.rules"
32   '';
34   propagatedBuildInputs = [ pyusb ];
36   optional-dependencies = {
37     serial = [ pyserial ];
38     influx = [ influxdb-client ];
39   };
41   nativeCheckInputs = [ pytestCheckHook ];
43   pythonImportsCheck = [ "openant" ];
45   meta = with lib; {
46     homepage = "https://github.com/Tigge/openant";
47     description = "ANT and ANT-FS Python Library";
48     mainProgram = "openant";
49     license = licenses.mit;
50   };