98eb3e9ef5
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, asciidoctor
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "qrtool";
|
|
version = "0.10.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sorairolake";
|
|
repo = "qrtool";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-8j9yn76yGzhqOgQsxpa9TsXU/19IpmZH8PsK2gvybls=";
|
|
};
|
|
|
|
cargoHash = "sha256-RPiwpNY3J07HMORfK+kDiMk1eagvIjm9B5nnuXJp0wk=";
|
|
|
|
nativeBuildInputs = [ asciidoctor installShellFiles ];
|
|
|
|
postInstall = ''
|
|
# Built by ./build.rs using `asciidoctor`
|
|
installManPage ./target/*/release/build/qrtool*/out/*.?
|
|
|
|
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 ];
|
|
description = "Utility for encoding and decoding QR code images";
|
|
license = licenses.asl20;
|
|
homepage = "https://sorairolake.github.io/qrtool/book/index.html";
|
|
changelog = "https://sorairolake.github.io/qrtool/book/changelog.html";
|
|
mainProgram = "qrtool";
|
|
};
|
|
}
|