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 , bash 7 , installShellFiles 8 , libiconv 9 }: 10 11 rustPlatform.buildRustPackage rec { 12 pname = "just"; 13 version = "1.13.0"; 14 15 src = fetchFromGitHub { 16 owner = "casey"; ··· 21 22 cargoHash = "sha256-91C/5m2avsW7GKQDg/Ez9fzzFhe8ih1De1RbV/MBJbM="; 23 24 - nativeBuildInputs = [ installShellFiles ]; 25 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 26 27 preCheck = '' ··· 42 cp $TMPDIR/string.rs tests/string.rs 43 ''; 44 45 checkFlags = [ 46 "--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 "--skip=run_shebang" # test case very rarely fails with "Text file busy" ··· 49 ]; 50 51 postInstall = '' 52 installManPage man/just.1 53 54 installShellCompletion --cmd just \
··· 6 , bash 7 , installShellFiles 8 , libiconv 9 + , mdbook 10 }: 11 12 rustPlatform.buildRustPackage rec { 13 pname = "just"; 14 version = "1.13.0"; 15 + outputs = [ "out" "man" "doc" ]; 16 17 src = fetchFromGitHub { 18 owner = "casey"; ··· 23 24 cargoHash = "sha256-91C/5m2avsW7GKQDg/Ez9fzzFhe8ih1De1RbV/MBJbM="; 25 26 + nativeBuildInputs = [ installShellFiles mdbook ]; 27 buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 28 29 preCheck = '' ··· 44 cp $TMPDIR/string.rs tests/string.rs 45 ''; 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 + 56 checkFlags = [ 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 58 "--skip=run_shebang" # test case very rarely fails with "Text file busy" ··· 60 ]; 61 62 postInstall = '' 63 + mkdir -p $doc/share/doc/$name 64 + mv ./book/en/build/html $doc/share/doc/$name 65 installManPage man/just.1 66 67 installShellCompletion --cmd just \