2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, bison, flex, libusb-compat-0_1, libelf
|
|
|
|
, libftdi1, readline
|
|
|
|
# documentation building is broken on darwin
|
2023-11-16 04:20:00 +00:00
|
|
|
, docSupport ? (!stdenv.isDarwin), texliveMedium, texinfo, texi2html, unixtools }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "avrdude";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "7.2";
|
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-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-/JyhMBcjNklyyXZEFZGTjrTNyafXEdHEhcLz6ZQx9aU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ cmake bison flex ] ++ lib.optionals docSupport [
|
|
|
|
unixtools.more
|
2023-11-16 04:20:00 +00:00
|
|
|
texliveMedium
|
2023-07-15 17:15:38 +00:00
|
|
|
texinfo
|
|
|
|
texi2html
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cmakeFlags = lib.optionals docSupport [
|
|
|
|
"-DBUILD_DOC=ON"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# dvips output references texlive in comments, resulting in a huge closure
|
|
|
|
postInstall = lib.optionalString docSupport ''
|
|
|
|
rm $out/share/doc/${pname}/*.ps
|
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|