forked from tiacsys/bridle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.nix
60 lines (53 loc) · 1 KB
/
doc.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ lib
, stdenv
, west2nixHook
, pythonEnv
, cmake
, ninja
, doxygen
, mscgen
, graphviz
, git
, zephyr
, bridle
}:
stdenv.mkDerivation {
name = "bridle-doc";
src = bridle;
unpackPhase = ''
cp -r ${bridle} bridle
chmod +w -R bridle
cd bridle
git init
git config user.email "[email protected]"
git config user.name "Foo"
git checkout -b fake-branch
git add -A
git commit -m "Fake Commnit"
cd ..
'';
nativeBuildInputs = [
west2nixHook
pythonEnv
cmake
ninja
doxygen
mscgen
graphviz
git
];
dontUseCmakeConfigure = true;
CMAKE_PREFIX_PATH = "/build/bridle/share/bridle-package:/build/zephyr/share/zephyr-package";
buildPhase = ''
cd /build
chmod +w -R ./*
west build --cmake-only -b none -d build bridle/doc
west build -t zephyr-doxygen -b none -d build
west build -t bridle-doxygen -b none -d build
west build -t build-all -b none -d build
'';
installPhase = ''
mkdir $out
cp -r build/html $out/
'';
}