qrtool: nixfmt

This commit is contained in:
Philip Taron 2024-08-14 10:23:53 -07:00
parent 25e3758f72
commit 18e78c0770
No known key found for this signature in database

View File

@ -1,9 +1,10 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, asciidoctor
, installShellFiles
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
asciidoctor,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
@ -19,18 +20,23 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-lR/LusIgdA+G7YeSLHjxdcC96tOSqSyalVamS42ORs0=";
nativeBuildInputs = [ asciidoctor installShellFiles ];
nativeBuildInputs = [
asciidoctor
installShellFiles
];
postInstall = ''
# Built by ./build.rs using `asciidoctor`
installManPage ./target/*/release/build/qrtool*/out/*.?
postInstall =
''
# Built by ./build.rs using `asciidoctor`
installManPage ./target/*/release/build/qrtool*/out/*.?
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd qrtool \
--bash <($out/bin/qrtool --generate-completion bash) \
--fish <($out/bin/qrtool --generate-completion fish) \
--zsh <($out/bin/qrtool --generate-completion zsh)
'';
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd qrtool \
--bash <($out/bin/qrtool --generate-completion bash) \
--fish <($out/bin/qrtool --generate-completion fish) \
--zsh <($out/bin/qrtool --generate-completion zsh)
'';
meta = with lib; {
maintainers = with maintainers; [ philiptaron ];