diff --git a/pkgs/development/compilers/zig/0.10.nix b/pkgs/development/compilers/zig/0.10.nix index 966be329befc..860baf1d6045 100644 --- a/pkgs/development/compilers/zig/0.10.nix +++ b/pkgs/development/compilers/zig/0.10.nix @@ -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 '';