nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 unittestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "pyserial";
11 version = "3.5";
12 format = "setuptools";
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-PHfgFBcN//vYFub/wgXphC77EL6fWOwW0+hnW0klzds=";
17 };
18
19 patches = [
20 ./001-rfc2217-only-negotiate-on-value-change.patch
21 ./002-rfc2217-timeout-setter-for-rfc2217.patch
22 ];
23
24 doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
25
26 nativeCheckInputs = [ unittestCheckHook ];
27
28 unittestFlagsArray = [
29 "-s"
30 "test"
31 ];
32
33 pythonImportsCheck = [ "serial" ];
34
35 meta = {
36 description = "Python serial port extension";
37 homepage = "https://github.com/pyserial/pyserial";
38 license = lib.licenses.bsd3;
39 maintainers = with lib.maintainers; [ makefu ];
40 };
41}