avrdude: rewrite expression

* Use stdenv.mkDerivation instead of composableDerivation.
  stdenv.mkDerivation is the current coding standard and is easier to
  read (IMHO).

* Remove the 'parportSupport' flag because it doesn't do anything.
  (Parallel port support is still enabled.)

* Remove unneeded --disable-dependency-tracking flag to ./configure; our
  default builder does that already.

* Fix documentation build. But it is still disabled (by default),
  because texLive is such a big dependency. There is always the man
  page.

* Update 'meta' attributes
This commit is contained in:
Bjørn Forsman 2014-05-31 10:01:01 +02:00
parent 6c8f4fd0ef
commit be524e925b

View File

@ -1,8 +1,11 @@
{ composableDerivation, fetchurl, yacc, flex, texLive, libusb }: { stdenv, fetchurl, yacc, flex, libusb
# docSupport is a big dependency, disabled by default
, docSupport ? false, texLive ? null, texinfo ? null, texi2html ? null
}:
let edf = composableDerivation.edf; in assert docSupport -> texLive != null && texinfo != null && texi2html != null;
composableDerivation.composableDerivation {} rec { stdenv.mkDerivation rec {
name="avrdude-6.0.1"; name="avrdude-6.0.1";
src = fetchurl { src = fetchurl {
@ -10,22 +13,21 @@ composableDerivation.composableDerivation {} rec {
sha256 = "0hfy1qkc6a5vpqsp9ahi1fpf9x4s10wq4bpyblc26sx9vxl4d066"; sha256 = "0hfy1qkc6a5vpqsp9ahi1fpf9x4s10wq4bpyblc26sx9vxl4d066";
}; };
configureFlags = [ "--disable-dependency-tracking" ]; configureFlags = stdenv.lib.optionalString docSupport "--enable-doc";
buildInputs = [ yacc flex libusb ]; buildInputs = [ yacc flex libusb ]
++ stdenv.lib.optionals docSupport [ texLive texinfo texi2html ];
flags = meta = with stdenv.lib; {
edf { name = "doc"; enable = { buildInputs = texLive; configureFlags = ["--enable-doc"]; }; } description = "Command-line tool for programming Atmel AVR microcontrollers";
// edf { name = "parport"; }; longDescription = ''
AVRDUDE (AVR Downloader/UploaDEr) is an utility to
cfg = { download/upload/manipulate the ROM and EEPROM contents of AVR
docSupport = false; # untested microcontrollers using the in-system programming technique (ISP).
parportSupport = true; '';
}; homepage = http://www.nongnu.org/avrdude/;
license = licenses.gpl2Plus;
meta = { platforms = platforms.linux;
license = "GPL-2"; maintainers = [ maintainers.bjornfor ];
description = "AVR Downloader/UploaDEr";
homepage = http://savannah.nongnu.org/projects/avrdude;
}; };
} }