lol

avrdude: migrate to cmake

+12 -6
+12 -6
pkgs/development/embedded/avrdude/default.nix
··· 1 - { lib, stdenv, fetchurl, bison, flex, libusb-compat-0_1, libelf, libftdi1, readline 1 + { lib, stdenv, fetchFromGitHub, cmake, bison, flex, libusb-compat-0_1, libelf, libftdi1, readline 2 2 # docSupport is a big dependency, disabled by default 3 3 , docSupport ? false, texLive ? null, texinfo ? null, texi2html ? null 4 4 }: ··· 9 9 pname = "avrdude"; 10 10 version = "7.0"; 11 11 12 - src = fetchurl { 13 - url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz"; 14 - sha256 = "sha256-wO9l2Y1gQMoLTytwDVFGPCoflGZUQfOdFdl0Qtu3m1Q="; 12 + src = fetchFromGitHub { 13 + owner = "avrdudes"; 14 + repo = pname; 15 + rev = "v${version}"; 16 + sha256 = "sha256-T8MKrvBvFF3WFwBMIN75vCOS0khliHQI+GGQvCk7T1o="; 15 17 }; 16 18 17 - configureFlags = lib.optionals docSupport "--enable-doc"; 19 + nativeBuildInputs = [ cmake bison flex ]; 18 20 19 - buildInputs = [ bison flex libusb-compat-0_1 libelf libftdi1 readline ] 21 + buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ] 20 22 ++ lib.optionals docSupport [ texLive texinfo texi2html ]; 23 + 24 + cmakeFlags = lib.optionals docSupport [ 25 + "-DBUILD_DOC=ON" 26 + ]; 21 27 22 28 meta = with lib; { 23 29 description = "Command-line tool for programming Atmel AVR microcontrollers";