about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/embedded/avrdude
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/embedded/avrdude')
-rw-r--r--nixpkgs/pkgs/development/embedded/avrdude/default.nix34
1 files changed, 21 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/embedded/avrdude/default.nix b/nixpkgs/pkgs/development/embedded/avrdude/default.nix
index 83dbf2a18fae..dfd0f027d6b7 100644
--- a/nixpkgs/pkgs/development/embedded/avrdude/default.nix
+++ b/nixpkgs/pkgs/development/embedded/avrdude/default.nix
@@ -1,23 +1,31 @@
-{ lib, stdenv, fetchurl, 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
-}:
-
-assert docSupport -> texLive != null && texinfo != null && texi2html != null;
+{ lib, stdenv, fetchFromGitHub, cmake, bison, flex, libusb-compat-0_1, libelf
+, libftdi1, readline
+# documentation building is broken on darwin
+, docSupport ? (!stdenv.isDarwin), texlive, texinfo, texi2html, unixtools }:
 
 stdenv.mkDerivation rec {
   pname = "avrdude";
-  version = "7.0";
+  version = "7.1";
 
-  src = fetchurl {
-    url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "sha256-wO9l2Y1gQMoLTytwDVFGPCoflGZUQfOdFdl0Qtu3m1Q=";
+  src = fetchFromGitHub {
+    owner = "avrdudes";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-pGjOefWnf11kG/zFGwYGet1OjAhKsULNGgh6vqvIQ7c=";
   };
 
-  configureFlags = lib.optionals docSupport "--enable-doc";
+  nativeBuildInputs = [ cmake bison flex ] ++ lib.optionals docSupport [
+    unixtools.more
+    texlive.combined.scheme-medium
+    texinfo
+    texi2html
+  ];
+
+  buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ];
 
-  buildInputs = [ bison flex 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";