Merge pull request #229591 from KAction/contrib/0/just-doc/out

just: build offline documentation

authored by Jörg Thalheim and committed by GitHub 58f8ca5f ff7edb3c

+14 -1
+14 -1
pkgs/development/tools/just/default.nix
··· 6 6 , bash 7 7 , installShellFiles 8 8 , libiconv 9 + , mdbook 9 10 }: 10 11 11 12 rustPlatform.buildRustPackage rec { 12 13 pname = "just"; 13 14 version = "1.13.0"; 15 + outputs = [ "out" "man" "doc" ]; 14 16 15 17 src = fetchFromGitHub { 16 18 owner = "casey"; ··· 21 23 22 24 cargoHash = "sha256-91C/5m2avsW7GKQDg/Ez9fzzFhe8ih1De1RbV/MBJbM="; 23 25 24 - nativeBuildInputs = [ installShellFiles ]; 26 + nativeBuildInputs = [ installShellFiles mdbook ]; 25 27 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 26 28 27 29 preCheck = '' ··· 42 44 cp $TMPDIR/string.rs tests/string.rs 43 45 ''; 44 46 47 + postBuild = '' 48 + cargo run --package generate-book 49 + 50 + # No linkcheck in sandbox 51 + echo 'optional = true' >> book/en/book.toml 52 + mdbook build book/en 53 + find . 54 + ''; 55 + 45 56 checkFlags = [ 46 57 "--skip=edit" # trying to run "vim" fails as there's no /usr/bin/env or which in the sandbox to find vim and the dependency is not easily patched 47 58 "--skip=run_shebang" # test case very rarely fails with "Text file busy" ··· 49 60 ]; 50 61 51 62 postInstall = '' 63 + mkdir -p $doc/share/doc/$name 64 + mv ./book/en/build/html $doc/share/doc/$name 52 65 installManPage man/just.1 53 66 54 67 installShellCompletion --cmd just \