2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, async-timeout
|
|
|
|
, docopt
|
|
|
|
, pyserial
|
|
|
|
, pyserial-asyncio
|
|
|
|
, setuptools
|
|
|
|
, pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
, pythonOlder
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rflink";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.0.66";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aequitas";
|
|
|
|
repo = "python-rflink";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-n6VLa0xX1qewMS7Kv+kiitezWRbRvDJRNuOmA7IV6u0=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
docopt
|
|
|
|
pyserial
|
|
|
|
pyserial-asyncio
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version=version_from_git()" "version='${version}'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"rflink.protocol"
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library and CLI tools for interacting with RFlink 433MHz transceiver";
|
|
|
|
homepage = "https://github.com/aequitas/python-rflink";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/aequitas/python-rflink/releases/tag/${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|