nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 52 lines 1.0 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pyusb, 7 influxdb-client, 8 pyserial, 9 pytestCheckHook, 10 udevCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "openant-unstable"; 15 version = "1.3.1"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "Tigge"; 20 repo = "openant"; 21 tag = "v${version}"; 22 hash = "sha256-wDtHlkVyD7mMDXZ4LGMgatr9sSlQKVbgkYsKvHGr9Pc="; 23 }; 24 25 nativeBuildInputs = [ 26 setuptools 27 udevCheckHook 28 ]; 29 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 ''; 34 35 propagatedBuildInputs = [ pyusb ]; 36 37 optional-dependencies = { 38 serial = [ pyserial ]; 39 influx = [ influxdb-client ]; 40 }; 41 42 nativeCheckInputs = [ pytestCheckHook ]; 43 44 pythonImportsCheck = [ "openant" ]; 45 46 meta = { 47 homepage = "https://github.com/Tigge/openant"; 48 description = "ANT and ANT-FS Python Library"; 49 mainProgram = "openant"; 50 license = lib.licenses.mit; 51 }; 52}