at 23.05-pre 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, async-timeout 6, docopt 7, pyserial 8, pyserial-asyncio 9, setuptools 10, pytestCheckHook 11, pythonAtLeast 12}: 13 14buildPythonPackage rec { 15 pname = "rflink"; 16 version = "0.0.63"; 17 format = "setuptools"; 18 19 src = fetchFromGitHub { 20 owner = "aequitas"; 21 repo = "python-rflink"; 22 rev = "refs/tags/${version}"; 23 sha256 = "sha256-BNKcXtsBB90KQe4HXmfJ7H3yepk1dEkozSEy5v8KSAA="; 24 }; 25 26 propagatedBuildInputs = [ 27 async-timeout 28 docopt 29 pyserial 30 pyserial-asyncio 31 setuptools 32 ]; 33 34 checkInputs = [ 35 pytestCheckHook 36 ]; 37 38 disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [ 39 # https://github.com/aequitas/python-rflink/issues/65 40 "tests/test_proxy.py" 41 ]; 42 43 postPatch = '' 44 substituteInPlace setup.py \ 45 --replace "version=version_from_git()" "version='${version}'" 46 ''; 47 48 pythonImportsCheck = [ 49 "rflink.protocol" 50 ]; 51 52 meta = with lib; { 53 description = "Library and CLI tools for interacting with RFlink 433MHz transceiver"; 54 homepage = "https://github.com/aequitas/python-rflink"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ dotlambda ]; 57 }; 58}