qrtool: add shell completions and man pages
This commit is contained in:
parent
6b20d38e01
commit
3da9fa3ad3
@ -3,6 +3,7 @@
|
|||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, asciidoctor
|
, asciidoctor
|
||||||
|
, installShellFiles
|
||||||
}: let
|
}: let
|
||||||
name = "qrtool";
|
name = "qrtool";
|
||||||
version = "0.8.5";
|
version = "0.8.5";
|
||||||
@ -19,7 +20,17 @@ in rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
cargoSha256 = "sha256-JOnvlabCr3fZsIIRc2qTjf50Ga83zL8Aoo2sqzMBs7g=";
|
cargoSha256 = "sha256-JOnvlabCr3fZsIIRc2qTjf50Ga83zL8Aoo2sqzMBs7g=";
|
||||||
|
|
||||||
nativeBuildInputs = [ asciidoctor ];
|
nativeBuildInputs = [ asciidoctor installShellFiles ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# Built by ./build.rs using `asciidoctor`
|
||||||
|
installManPage ./target/*/release/build/${name}*/out/*.?
|
||||||
|
|
||||||
|
installShellCompletion --cmd ${name} \
|
||||||
|
--bash <($out/bin/${name} --generate-completion bash) \
|
||||||
|
--fish <($out/bin/${name} --generate-completion fish) \
|
||||||
|
--zsh <($out/bin/${name} --generate-completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
maintainers = with maintainers; [ philiptaron ];
|
maintainers = with maintainers; [ philiptaron ];
|
||||||
|
Loading…
Reference in New Issue
Block a user