mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 12:14:10 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
45 lines
912 B
Nix
45 lines
912 B
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, unittestCheckHook
|
|
, pythonOlder
|
|
, isPy3k
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyserial";
|
|
version = "3.5";
|
|
format = "setuptools";
|
|
|
|
# Supports Python 2.7 and 3.4+
|
|
disabled = isPy3k && pythonOlder "3.4";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-PHfgFBcN//vYFub/wgXphC77EL6fWOwW0+hnW0klzds=";
|
|
};
|
|
|
|
patches = [
|
|
./001-rfc2217-only-negotiate-on-value-change.patch
|
|
./002-rfc2217-timeout-setter-for-rfc2217.patch
|
|
];
|
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
|
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
unittestFlagsArray = [ "-s" "test" ];
|
|
|
|
pythonImportsCheck = [
|
|
"serial"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python serial port extension";
|
|
homepage = "https://github.com/pyserial/pyserial";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ makefu ];
|
|
};
|
|
}
|