c7f94ff3ce
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
46 lines
950 B
Nix
46 lines
950 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pyserial
|
|
, pythonOlder
|
|
, pyusb
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyftdi";
|
|
version = "0.55.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "eblot";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-EEMHY5EKftci72huF5UmJyh2wJAc8uNh/QhGSSAVXIU=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
pyserial
|
|
pyusb
|
|
];
|
|
|
|
# Tests require access to the serial port
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"pyftdi"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "User-space driver for modern FTDI devices";
|
|
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.
|
|
'';
|
|
homepage = "https://github.com/eblot/pyftdi";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|