From b1f0d7b54fe49daccb37e072843f0f93610e7055 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 8 Nov 2023 09:51:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Unify=20generateDocs=20and=20enable?= =?UTF-8?q?Doxygen=20for=20C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit generateDocs is deprecated and the name enableDoxygen is now used everywhere. This also fixes an issue where the `doc` output on the C derivation was accessed even when doxygen was disabled on the derivation level. --- c/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/c/default.nix b/c/default.nix index e6ab0b6..b46345f 100644 --- a/c/default.nix +++ b/c/default.nix @@ -4,11 +4,24 @@ let self = , pkgs , platforms ? { } , extraAttrs ? { } + # TODO: remove generateDocs in next major. It is renamed to enableDoxygen to be + # consistent with make-derivation.nix , generateDocs ? true + , enableDoxygen ? true , components , mathjax ? null }: let + enableDoxygen' = + if args ? generateDocs then + lib.trivial.warn + '' + generateDocs is deprecated, use enableDoxygen instead. + enableDoxygen can also be used on derivation-level. + '' + generateDocs + else + enableDoxygen; mathjaxDefaultVersion = "3.2.2"; mathjax' = if mathjax == null then @@ -66,7 +79,7 @@ let self = ({ name = targets._default.name; version = targets._default.version; - } // targets // lib.optionalAttrs generateDocs { + } // targets // lib.optionalAttrs (targets._default.enableDoxygen or enableDoxygen') { docs.api = targets._default.doc; }); in