2009-09-24 21:28:27 +00:00
|
|
|
{stdenv, fetchurl, libusb}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-05-10 11:34:59 +00:00
|
|
|
name = "libftdi-0.20";
|
2018-03-19 23:01:52 +00:00
|
|
|
|
2009-09-24 21:28:27 +00:00
|
|
|
src = fetchurl {
|
2018-06-28 18:43:35 +00:00
|
|
|
url = "https://www.intra2net.com/en/developer/libftdi/download/${name}.tar.gz";
|
2013-05-10 11:34:59 +00:00
|
|
|
sha256 = "13l39f6k6gff30hsgh0wa2z422g9pyl91rh8a8zz6f34k2sxaxii";
|
2009-09-24 21:28:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libusb ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ libusb ];
|
|
|
|
|
2017-05-16 14:35:52 +00:00
|
|
|
# Hack to avoid TMPDIR in RPATHs.
|
|
|
|
preFixup = ''rm -rf "$(pwd)" '';
|
2018-02-21 07:24:36 +00:00
|
|
|
configureFlags = [ "--with-async-mode" ];
|
|
|
|
|
|
|
|
# allow async mode. from ubuntu. see:
|
|
|
|
# https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libftdi/trusty/view/head:/debian/patches/04_async_mode.diff
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace ./src/ftdi.c \
|
|
|
|
--replace "ifdef USB_CLASS_PTP" "if 0"
|
|
|
|
'';
|
2017-05-16 14:35:52 +00:00
|
|
|
|
2009-09-24 21:28:27 +00:00
|
|
|
meta = {
|
|
|
|
description = "A library to talk to FTDI chips using libusb";
|
2017-08-02 21:50:51 +00:00
|
|
|
homepage = https://www.intra2net.com/en/developer/libftdi/;
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2018-03-19 23:01:52 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-09-24 21:28:27 +00:00
|
|
|
};
|
|
|
|
}
|