1
0
Fork 0
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:
Valentin Gagarin 2024-06-17 15:50:59 +02:00 committed by John Ericson
parent 69d404edad
commit 6e34c68327
14 changed files with 136 additions and 70 deletions

View 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;
};
})