mirror of
https://github.com/NixOS/nix
synced 2025-07-04 23:51:47 +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
56
src/internal-api-docs/package.nix
Normal file
56
src/internal-api-docs/package.nix
Normal file
|
@ -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;
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue