2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2024-01-02 11:29:13 +00:00
|
|
|
, asciidoctor
|
|
|
|
, installShellFiles
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "qrtool";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.11.3";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sorairolake";
|
|
|
|
repo = "qrtool";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-TA4JuFd01gOzLDFYzuP0Ohk+Bd6lT3oZF9sFY9KjOfM=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cargoHash = "sha256-bcrwf7Ufd7o2FPIxEReZGy9EANdWNOgoFBHzSdoYTlI=";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
'';
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
maintainers = with maintainers; [ philiptaron ];
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Utility for encoding and decoding QR code images";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = "https://sorairolake.github.io/qrtool/book/index.html";
|
|
|
|
changelog = "https://sorairolake.github.io/qrtool/book/changelog.html";
|
|
|
|
mainProgram = "qrtool";
|
|
|
|
};
|
|
|
|
}
|