2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mock,
|
|
|
|
pynose,
|
|
|
|
pyserial,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2021-01-09 10:05:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylacrosse";
|
|
|
|
version = "0.4";
|
2023-04-29 16:46:19 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hthiery";
|
|
|
|
repo = "python-lacrosse";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-jrkehoPLYbutDfxMBO/vlx4nMylTNs/gtvoBTFHFsDw=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version = version," "version = '${version}',"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pyserial ];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
mock
|
2024-04-21 15:54:59 +00:00
|
|
|
pynose
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pylacrosse" ];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for Jeelink LaCrosse";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pylacrosse";
|
2021-01-09 10:05:03 +00:00
|
|
|
homepage = "https://github.com/hthiery/python-lacrosse";
|
|
|
|
license = with licenses; [ lgpl2Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|