1{ stdenv, fetchurl, yacc, flex, libusb, libelf, libftdi1, readline
2# docSupport is a big dependency, disabled by default
3, docSupport ? false, texLive ? null, texinfo ? null, texi2html ? null
4}:
5
6assert docSupport -> texLive != null && texinfo != null && texi2html != null;
7
8stdenv.mkDerivation rec {
9 name = "avrdude-6.3";
10
11 src = fetchurl {
12 url = "mirror://savannah/avrdude/${name}.tar.gz";
13 sha256 = "15m1w1qad3dj7r8n5ng1qqcaiyx1gyd6hnc3p2apgjllccdp77qg";
14 };
15
16 configureFlags = stdenv.lib.optionals docSupport "--enable-doc";
17
18 buildInputs = [ yacc flex libusb libelf libftdi1 readline ]
19 ++ stdenv.lib.optionals docSupport [ texLive texinfo texi2html ];
20
21 meta = with stdenv.lib; {
22 description = "Command-line tool for programming Atmel AVR microcontrollers";
23 longDescription = ''
24 AVRDUDE (AVR Downloader/UploaDEr) is an utility to
25 download/upload/manipulate the ROM and EEPROM contents of AVR
26 microcontrollers using the in-system programming technique (ISP).
27 '';
28 homepage = http://www.nongnu.org/avrdude/;
29 license = licenses.gpl2Plus;
30 platforms = with platforms; linux ++ darwin;
31 maintainers = [ maintainers.bjornfor ];
32 };
33}