mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Convert the internal API doc build to Meson
This commit is contained in:
parent
69d404edad
commit
6e34c68327
14 changed files with 136 additions and 70 deletions
19
package.nix
19
package.nix
|
@ -93,9 +93,8 @@
|
|||
# - readline
|
||||
, readlineFlavor ? if stdenv.hostPlatform.isWindows then "readline" else "editline"
|
||||
|
||||
# Whether to build the internal/external API docs, can be done separately from
|
||||
# Whether to build the external API docs, can be done separately from
|
||||
# everything else.
|
||||
, enableInternalAPIDocs ? forDevShell
|
||||
, enableExternalAPIDocs ? forDevShell
|
||||
|
||||
# Whether to install unit tests. This is useful when cross compiling
|
||||
|
@ -185,11 +184,9 @@ in {
|
|||
./scripts/local.mk
|
||||
] ++ lib.optionals buildUnitTests [
|
||||
./doc/manual
|
||||
] ++ lib.optionals enableInternalAPIDocs [
|
||||
./doc/internal-api
|
||||
] ++ lib.optionals enableExternalAPIDocs [
|
||||
./doc/external-api
|
||||
] ++ lib.optionals (enableInternalAPIDocs || enableExternalAPIDocs) [
|
||||
] ++ lib.optionals enableExternalAPIDocs [
|
||||
# Source might not be compiled, but still must be available
|
||||
# for Doxygen to gather comments.
|
||||
(fileset.difference ./src ./src/perl)
|
||||
|
@ -207,7 +204,7 @@ in {
|
|||
++ lib.optional doBuild "dev"
|
||||
# If we are doing just build or just docs, the one thing will use
|
||||
# "out". We only need additional outputs if we are doing both.
|
||||
++ lib.optional (doBuild && (enableManual || enableInternalAPIDocs || enableExternalAPIDocs)) "doc"
|
||||
++ lib.optional (doBuild && (enableManual || enableExternalAPIDocs)) "doc"
|
||||
++ lib.optional installUnitTests "check"
|
||||
++ lib.optional doCheck "testresults"
|
||||
;
|
||||
|
@ -231,7 +228,7 @@ in {
|
|||
] ++ lib.optionals (doInstallCheck || enableManual) [
|
||||
jq # Also for custom mdBook preprocessor.
|
||||
] ++ lib.optional stdenv.hostPlatform.isLinux util-linux
|
||||
++ lib.optional (enableInternalAPIDocs || enableExternalAPIDocs) doxygen
|
||||
++ lib.optional enableExternalAPIDocs doxygen
|
||||
;
|
||||
|
||||
buildInputs = lib.optionals doBuild [
|
||||
|
@ -294,7 +291,6 @@ in {
|
|||
(lib.enableFeature doBuild "build")
|
||||
(lib.enableFeature buildUnitTests "unit-tests")
|
||||
(lib.enableFeature doInstallCheck "functional-tests")
|
||||
(lib.enableFeature enableInternalAPIDocs "internal-api-docs")
|
||||
(lib.enableFeature enableExternalAPIDocs "external-api-docs")
|
||||
(lib.enableFeature enableManual "doc-gen")
|
||||
(lib.enableFeature enableGC "gc")
|
||||
|
@ -324,7 +320,6 @@ in {
|
|||
'';
|
||||
|
||||
installTargets = lib.optional doBuild "install"
|
||||
++ lib.optional enableInternalAPIDocs "internal-api-html"
|
||||
++ lib.optional enableExternalAPIDocs "external-api-html";
|
||||
|
||||
installFlags = "sysconfdir=$(out)/etc";
|
||||
|
@ -349,11 +344,7 @@ in {
|
|||
) + lib.optionalString enableManual ''
|
||||
mkdir -p ''${!outputDoc}/nix-support
|
||||
echo "doc manual ''${!outputDoc}/share/doc/nix/manual" >> ''${!outputDoc}/nix-support/hydra-build-products
|
||||
'' + lib.optionalString enableInternalAPIDocs ''
|
||||
mkdir -p ''${!outputDoc}/nix-support
|
||||
echo "doc internal-api-docs $out/share/doc/nix/internal-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
||||
''
|
||||
+ lib.optionalString enableExternalAPIDocs ''
|
||||
'' + lib.optionalString enableExternalAPIDocs ''
|
||||
mkdir -p ''${!outputDoc}/nix-support
|
||||
echo "doc external-api-docs $out/share/doc/nix/external-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue