From 9aa6989b6454585650d7376f74151cf0dad1b11c Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 3 May 2022 22:08:43 +0200 Subject: [PATCH] avrdude: always build documentation on Linux Make texlive a build-time dependency to always build the docs on Linux. --- pkgs/development/embedded/avrdude/default.nix | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/development/embedded/avrdude/default.nix b/pkgs/development/embedded/avrdude/default.nix index fd54383f9efb..dfd0f027d6b7 100644 --- a/pkgs/development/embedded/avrdude/default.nix +++ b/pkgs/development/embedded/avrdude/default.nix @@ -1,9 +1,7 @@ -{ 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 -}: - -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"; @@ -16,10 +14,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-pGjOefWnf11kG/zFGwYGet1OjAhKsULNGgh6vqvIQ7c="; }; - nativeBuildInputs = [ cmake bison flex ]; + nativeBuildInputs = [ cmake bison flex ] ++ lib.optionals docSupport [ + unixtools.more + texlive.combined.scheme-medium + texinfo + texi2html + ]; - buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ] - ++ lib.optionals docSupport [ texLive texinfo texi2html ]; + buildInputs = [ libusb-compat-0_1 libelf libftdi1 readline ]; cmakeFlags = lib.optionals docSupport [ "-DBUILD_DOC=ON"