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
1 changed files with 20 additions and 18 deletions

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";
src = fetchurl {
@ -10,22 +13,21 @@ composableDerivation.composableDerivation {} rec {
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 =
edf { name = "doc"; enable = { buildInputs = texLive; configureFlags = ["--enable-doc"]; }; }
// edf { name = "parport"; };
cfg = {
docSupport = false; # untested
parportSupport = true;
};
meta = {
license = "GPL-2";
description = "AVR Downloader/UploaDEr";
homepage = http://savannah.nongnu.org/projects/avrdude;
meta = with stdenv.lib; {
description = "Command-line tool for programming Atmel AVR microcontrollers";
longDescription = ''
AVRDUDE (AVR Downloader/UploaDEr) is an utility to
download/upload/manipulate the ROM and EEPROM contents of AVR
microcontrollers using the in-system programming technique (ISP).
'';
homepage = http://www.nongnu.org/avrdude/;
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}