2022-10-21 18:38:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, bison, flex, libusb-compat-0_1, libelf, libftdi1, readline
|
2020-04-24 23:36:52 +00:00
|
|
|
# docSupport is a big dependency, disabled by default
|
|
|
|
, docSupport ? false, texLive ? null, texinfo ? null, texi2html ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert docSupport -> texLive != null && texinfo != null && texi2html != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "avrdude";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "avrdudes";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-pGjOefWnf11kG/zFGwYGet1OjAhKsULNGgh6vqvIQ7c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [ cmake bison flex ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals docSupport [ texLive texinfo texi2html ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cmakeFlags = lib.optionals docSupport [
|
|
|
|
"-DBUILD_DOC=ON"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 = "https://www.nongnu.org/avrdude/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|