mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 04:56:01 +01:00
Port C API docs to Meson (#10936)
* Port C API docs to Meson * don't cross-compile the docs
This commit is contained in:
parent
0c6029669d
commit
1c131ec2b7
16 changed files with 131 additions and 68 deletions
65
src/external-api-docs/package.nix
Normal file
65
src/external-api-docs/package.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue