-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Port C API docs to Meson * don't cross-compile the docs
- Loading branch information
1 parent
0c60296
commit 1c131ec
Showing
16 changed files
with
131 additions
and
68 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 |
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
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-external-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( | ||
'external-api-docs', | ||
command : [ doxygen , doxygen_cfg ], | ||
input : [ | ||
doxygen_cfg, | ||
], | ||
output : 'html', | ||
install : true, | ||
install_dir : get_option('datadir') / 'doc/nix/external-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,65 @@ | ||
{ lib | ||
, stdenv | ||
, releaseTools | ||
, fileset | ||
|
||
, meson | ||
, ninja | ||
, doxygen | ||
|
||
# Configuration Options | ||
|
||
, versionSuffix ? "" | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "nix-external-api-docs"; | ||
version = lib.fileContents ./.version + versionSuffix; | ||
|
||
src = fileset.toSource { | ||
root = ../..; | ||
fileset = | ||
let | ||
cpp = fileset.fileFilter (file: file.hasExt "cc" || file.hasExt "h"); | ||
in | ||
fileset.unions [ | ||
./meson.build | ||
./doxygen.cfg.in | ||
./README.md | ||
# Source is not compiled, but still must be available for Doxygen | ||
# to gather comments. | ||
(cpp ../libexpr-c) | ||
(cpp ../libstore-c) | ||
(cpp ../libutil-c) | ||
]; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
meson | ||
ninja | ||
doxygen | ||
]; | ||
|
||
postUnpack = '' | ||
sourceRoot=$sourceRoot/src/external-api-docs | ||
''; | ||
|
||
preConfigure = | ||
# "Inline" .version so it's not a symlink, and includes the suffix | ||
'' | ||
echo ${finalAttrs.version} > .version | ||
''; | ||
|
||
postInstall = '' | ||
mkdir -p ''${!outputDoc}/nix-support | ||
echo "doc external-api-docs $out/share/doc/nix/external-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products | ||
''; | ||
|
||
enableParallelBuilding = true; | ||
|
||
strictDeps = true; | ||
|
||
meta = { | ||
platforms = lib.platforms.all; | ||
}; | ||
}) |
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