1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pyserial
5, pythonOlder
6, pyusb
7}:
8
9buildPythonPackage rec {
10 pname = "pyftdi";
11 version = "0.53.3";
12 disabled = pythonOlder "3.5";
13
14 src = fetchFromGitHub {
15 owner = "eblot";
16 repo = pname;
17 rev = "v${version}";
18 sha256 = "sha256-t4rFsuhcpYdgmQeog+DRFxHk0wpMc+aukQi981vH/44=";
19 };
20
21 propagatedBuildInputs = [ pyusb pyserial ];
22
23 # tests requires access to the serial port
24 doCheck = false;
25
26 pythonImportsCheck = [ "pyftdi" ];
27
28 meta = with lib; {
29 description = "User-space driver for modern FTDI devices";
30 longDescription = ''
31 PyFtdi aims at providing a user-space driver for popular FTDI devices.
32 This includes UART, GPIO and multi-serial protocols (SPI, I2C, JTAG)
33 bridges.
34 '';
35 homepage = "https://github.com/eblot/pyftdi";
36 license = licenses.bsd3;
37 maintainers = with maintainers; [ fab ];
38 };
39}