avrdude: migrate to cmake

This commit is contained in:
Weijia Wang 2022-10-11 14:15:55 +02:00
parent d87090ce15
commit f6dc0eefb9

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, bison, flex, libusb-compat-0_1, libelf, libftdi1, readline
{ lib, stdenv, fetchFromGitHub, cmake, bison, flex, libusb-compat-0_1, libelf, libftdi1, readline
# docSupport is a big dependency, disabled by default
, docSupport ? false, texLive ? null, texinfo ? null, texi2html ? null
}:
@ -9,16 +9,22 @@ stdenv.mkDerivation rec {
pname = "avrdude";
version = "7.0";
src = fetchurl {
url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
sha256 = "sha256-wO9l2Y1gQMoLTytwDVFGPCoflGZUQfOdFdl0Qtu3m1Q=";
src = fetchFromGitHub {
owner = "avrdudes";
repo = pname;
rev = "v${version}";
sha256 = "sha256-T8MKrvBvFF3WFwBMIN75vCOS0khliHQI+GGQvCk7T1o=";
};
configureFlags = lib.optionals docSupport "--enable-doc";
nativeBuildInputs = [ cmake bison flex ];
buildInputs = [ bison flex libusb-compat-0_1 libelf libftdi1 readline ]
buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ]
++ lib.optionals docSupport [ texLive texinfo texi2html ];
cmakeFlags = lib.optionals docSupport [
"-DBUILD_DOC=ON"
];
meta = with lib; {
description = "Command-line tool for programming Atmel AVR microcontrollers";
longDescription = ''