zig: build offline documentation
This commit is contained in:
parent
2da8d6d95a
commit
1360d4cc51
@ -11,6 +11,7 @@
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zig";
|
||||
version = "0.10.1";
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ziglang";
|
||||
@ -52,7 +53,17 @@ stdenv.mkDerivation rec {
|
||||
"-DZIG_TARGET_MCPU=baseline"
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
./zig2 build-exe ../doc/docgen.zig
|
||||
./docgen ./zig2 ../doc/langref.html.in ./langref.html
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 -t $doc/share/doc/$pname-$version/html ./langref.html
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/zig test --cache-dir "$TMPDIR" -I $src/test $src/test/behavior.zig
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user