Skip to content

Commit 4b6cab7

Browse files
committed
Add better documentation
1 parent ce087f5 commit 4b6cab7

2 files changed

Lines changed: 265 additions & 29 deletions

File tree

generate_doxygen.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
3+
pkgs.stdenv.mkDerivation {
4+
name = "generate-doxygen-doc";
5+
buildInputs = [ pkgs.doxygen pkgs.graphviz ];
6+
7+
src = ./include;
8+
9+
buildPhase = ''
10+
# Create a basic Doxygen configuration file if not present
11+
if [ ! -f Doxyfile ]; then
12+
doxygen -g Doxyfile
13+
fi
14+
15+
# Customize the Doxyfile for better output
16+
sed -i "s|^OUTPUT_DIRECTORY.*|OUTPUT_DIRECTORY = doxygen_output|" Doxyfile
17+
sed -i "s|^GENERATE_HTML.*NO|GENERATE_HTML = YES|" Doxyfile
18+
sed -i "s|^GENERATE_LATEX.*YES|GENERATE_LATEX = NO|" Doxyfile
19+
sed -i "s|^EXTRACT_ALL.*NO|EXTRACT_ALL = YES|" Doxyfile
20+
21+
# Run Doxygen
22+
doxygen Doxyfile
23+
'';
24+
25+
installPhase = ''
26+
mkdir -p $out
27+
cp -r doxygen_output $out/
28+
'';
29+
}

0 commit comments

Comments
 (0)