nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pyserial,
6 pyusb,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "pyftdi";
12 version = "0.57.1";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "eblot";
17 repo = "pyftdi";
18 tag = "v${version}";
19 hash = "sha256-RkZXcGvCZXmFrLvj7YqHc6FeZskEqMSQcYgizBSuwIk=";
20 };
21
22 build-system = [ setuptools ];
23
24 dependencies = [
25 pyserial
26 pyusb
27 ];
28
29 # Tests require access to the serial port
30 doCheck = false;
31
32 pythonImportsCheck = [ "pyftdi" ];
33
34 meta = {
35 description = "User-space driver for modern FTDI devices";
36 longDescription = ''
37 PyFtdi aims at providing a user-space driver for popular FTDI devices.
38 This includes UART, GPIO and multi-serial protocols (SPI, I2C, JTAG)
39 bridges.
40 '';
41 homepage = "https://github.com/eblot/pyftdi";
42 changelog = "https://github.com/eblot/pyftdi/releases/tag/v${version}";
43 license = lib.licenses.bsd3;
44 maintainers = with lib.maintainers; [ fab ];
45 };
46}