2022-06-07 10:10:58 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-08-06 12:32:04 -04:00
|
|
|
, unittestCheckHook
|
2022-06-07 10:10:58 +02:00
|
|
|
, pythonOlder
|
2022-06-25 22:08:20 -04:00
|
|
|
, isPy3k
|
2022-06-07 10:10:58 +02:00
|
|
|
}:
|
2017-09-29 14:57:20 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyserial";
|
2022-06-07 10:10:58 +02:00
|
|
|
version = "3.5";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2022-06-25 22:08:20 -04:00
|
|
|
# Supports Python 2.7 and 3.4+
|
|
|
|
disabled = isPy3k && pythonOlder "3.4";
|
2017-09-29 14:57:20 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-06-07 10:10:58 +02:00
|
|
|
hash = "sha256-PHfgFBcN//vYFub/wgXphC77EL6fWOwW0+hnW0klzds=";
|
2017-09-29 14:57:20 +02:00
|
|
|
};
|
|
|
|
|
2021-02-17 10:50:21 +01:00
|
|
|
patches = [
|
|
|
|
./001-rfc2217-only-negotiate-on-value-change.patch
|
|
|
|
./002-rfc2217-timeout-setter-for-rfc2217.patch
|
|
|
|
];
|
|
|
|
|
2018-08-20 14:43:41 -04:00
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
|
2017-09-29 14:57:20 +02:00
|
|
|
|
2022-08-06 12:32:04 -04:00
|
|
|
checkInputs = [ unittestCheckHook ];
|
|
|
|
|
|
|
|
unittestFlagsArray = [ "-s" "test" ];
|
2022-06-07 10:10:58 +02:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"serial"
|
|
|
|
];
|
|
|
|
|
2017-09-29 14:57:20 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python serial port extension";
|
2022-06-07 10:10:58 +02:00
|
|
|
homepage = "https://github.com/pyserial/pyserial";
|
|
|
|
license = licenses.bsd3;
|
2017-09-29 14:57:20 +02:00
|
|
|
maintainers = with maintainers; [ makefu ];
|
|
|
|
};
|
|
|
|
}
|