Skip to content

Commit

Permalink
⚡ Unify generateDocs and enableDoxygen for C
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abbec committed Nov 8, 2023
1 parent 843546f commit b1f0d7b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion c/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b1f0d7b

Please sign in to comment.