2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
unittestCheckHook,
|
2022-06-26 10:26:21 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyserial";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "3.5";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-PHfgFBcN//vYFub/wgXphC77EL6fWOwW0+hnW0klzds=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
patches = [
|
|
|
|
./001-rfc2217-only-negotiate-on-value-change.patch
|
|
|
|
./002-rfc2217-timeout-setter-for-rfc2217.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
unittestFlagsArray = [
|
|
|
|
"-s"
|
|
|
|
"test"
|
2022-06-26 10:26:21 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "serial" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python serial port extension";
|
2022-06-26 10:26:21 +00:00
|
|
|
homepage = "https://github.com/pyserial/pyserial";
|
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ makefu ];
|
|
|
|
};
|
|
|
|
}
|