2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pyserial,
|
|
|
|
pythonOlder,
|
|
|
|
pyusb,
|
|
|
|
setuptools,
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyftdi";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.55.4";
|
|
|
|
pyproject = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eblot";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "pyftdi";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-InJJnbAPYlV071EkEWECJC79HLZ6SWo2VP7PqMgOGow=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-03-30 09:31:56 +00:00
|
|
|
pyserial
|
|
|
|
pyusb
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# Tests require access to the serial port
|
2021-01-05 17:05:55 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "pyftdi" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|