-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert the internal API doc build to Meson
- Loading branch information
1 parent
69d404e
commit 6e34c68
Showing
14 changed files
with
136 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
project('nix-internal-api-docs', | ||
version : files('.version'), | ||
meson_version : '>= 1.1', | ||
license : 'LGPL-2.1-or-later', | ||
) | ||
|
||
fs = import('fs') | ||
|
||
doxygen_cfg = configure_file( | ||
input : 'doxygen.cfg.in', | ||
output : 'doxygen.cfg', | ||
configuration : { | ||
'PROJECT_NUMBER': meson.project_version(), | ||
'OUTPUT_DIRECTORY' : meson.current_build_dir(), | ||
'src' : fs.parent(fs.parent(meson.project_source_root())), | ||
}, | ||
) | ||
|
||
doxygen = find_program('doxygen', native : true, required : true) | ||
|
||
custom_target( | ||
'internal-api-docs', | ||
command : [ doxygen , doxygen_cfg ], | ||
input : [ | ||
doxygen_cfg, | ||
], | ||
output : 'html', | ||
install : true, | ||
install_dir : get_option('datadir') / 'doc/nix/internal-api', | ||
build_always_stale : true, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ lib | ||
, stdenv | ||
, releaseTools | ||
, fileset | ||
|
||
, meson | ||
, ninja | ||
, doxygen | ||
|
||
# Configuration Options | ||
|
||
, versionSuffix ? "" | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "nix-internal-api-docs"; | ||
version = lib.fileContents ./.version + versionSuffix; | ||
|
||
src = fileset.toSource { | ||
root = ../..; | ||
fileset = let | ||
cpp = fileset.fileFilter (file: file.hasExt "cc" || file.hasExt "hh"); | ||
in fileset.unions [ | ||
./meson.build | ||
./doxygen.cfg.in | ||
# Source is not compiled, but still must be available for Doxygen | ||
# to gather comments. | ||
(cpp ../.) | ||
(cpp ../../tests/unit) | ||
]; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
meson | ||
ninja | ||
doxygen | ||
]; | ||
|
||
postUnpack = '' | ||
sourceRoot=$sourceRoot/src/internal-api-docs | ||
''; | ||
|
||
preConfigure = | ||
# "Inline" .version so it's not a symlink, and includes the suffix | ||
'' | ||
echo ${finalAttrs.version} > .version | ||
''; | ||
|
||
enableParallelBuilding = true; | ||
|
||
strictDeps = true; | ||
|
||
meta = { | ||
platforms = lib.platforms.all; | ||
}; | ||
}) |