2021-01-05 17:05:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pyserial
|
|
|
|
, pythonOlder
|
|
|
|
, pyusb
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyftdi";
|
2021-05-28 09:39:13 +00:00
|
|
|
version = "0.53.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eblot";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-05-28 09:39:13 +00:00
|
|
|
sha256 = "sha256-lpNe+8DhyfVuClGcjWIA6pnfh+NwdlBGffjRH62K4uw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyusb pyserial ];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
# tests requires access to the serial port
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
pythonImportsCheck = [ "pyftdi" ];
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "User-space driver for modern FTDI devices";
|
2021-01-05 17:05:55 +00:00
|
|
|
longDescription = ''
|
|
|
|
PyFtdi aims at providing a user-space driver for popular FTDI devices.
|
|
|
|
This includes UART, GPIO and multi-serial protocols (SPI, I2C, JTAG)
|
|
|
|
bridges.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/eblot/pyftdi";
|
2021-01-05 17:05:55 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|