1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, async-timeout
5, docopt
6, pyserial
7, pyserial-asyncio
8, setuptools
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "rflink";
14 version = "0.0.58";
15
16 src = fetchFromGitHub {
17 owner = "aequitas";
18 repo = "python-rflink";
19 rev = version;
20 sha256 = "1zab55lsw419gg0jfrl69ap6128vbi3wdmg5z7qin65ijpjdhasc";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "version=version_from_git()" "version='${version}'"
26 '';
27
28 propagatedBuildInputs = [
29 async-timeout
30 docopt
31 pyserial
32 pyserial-asyncio
33 setuptools
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [ "rflink.protocol" ];
41
42 meta = with lib; {
43 description = "Library and CLI tools for interacting with RFlink 433MHz transceiver";
44 homepage = "https://github.com/aequitas/python-rflink";
45 license = licenses.mit;
46 maintainers = with maintainers; [ dotlambda ];
47 };
48}