Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyserial / default.nix
bloba515c5acfcd15e2e3e524d17ca8c4f9c3fee5bc9
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchPypi
5 , unittestCheckHook
6 , pythonOlder
7 , isPy3k
8 }:
10 buildPythonPackage rec {
11   pname = "pyserial";
12   version = "3.5";
13   format = "setuptools";
15   # Supports Python 2.7 and 3.4+
16   disabled = isPy3k && pythonOlder "3.4";
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-PHfgFBcN//vYFub/wgXphC77EL6fWOwW0+hnW0klzds=";
21   };
23   patches = [
24     ./001-rfc2217-only-negotiate-on-value-change.patch
25     ./002-rfc2217-timeout-setter-for-rfc2217.patch
26   ];
28   doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
30   nativeCheckInputs = [ unittestCheckHook ];
32   unittestFlagsArray = [ "-s" "test" ];
34   pythonImportsCheck = [
35     "serial"
36   ];
38   meta = with lib; {
39     description = "Python serial port extension";
40     homepage = "https://github.com/pyserial/pyserial";
41     license = licenses.bsd3;
42     maintainers = with maintainers; [ makefu ];
43   };