mirror of
https://github.com/NixOS/nix.git
synced 2025-12-10 02:51:02 +01:00
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
|
|
, meson
|
|
, ninja
|
|
, doxygen
|
|
|
|
# Configuration Options
|
|
|
|
, versionSuffix ? ""
|
|
}:
|
|
|
|
let
|
|
inherit (lib) fileset;
|
|
in
|
|
|
|
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 ../.)
|
|
];
|
|
};
|
|
|
|
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
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p ''${!outputDoc}/nix-support
|
|
echo "doc internal-api-docs $out/share/doc/nix/internal-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
strictDeps = true;
|
|
|
|
meta = {
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|