nixpkgs/pkgs/by-name/qr/qrtool/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.2 KiB
Nix
Raw Normal View History

2023-11-07 23:52:31 +00:00
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, asciidoctor
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "qrtool";
2024-04-16 11:10:55 +00:00
version = "0.10.8";
2023-11-07 23:52:31 +00:00
src = fetchFromGitHub {
owner = "sorairolake";
repo = "qrtool";
2023-11-07 23:52:31 +00:00
rev = "v${version}";
2024-04-16 11:10:55 +00:00
sha256 = "sha256-YNA8LdqkgScBAoLyWsr4JIeFcU4KfNAYByXSvaccOoU=";
2023-11-07 23:52:31 +00:00
};
2024-04-16 11:10:55 +00:00
cargoHash = "sha256-6yQVH15oW8dCjNKwL2Gb6IQKilVYokBs2j+M4fWLm+4=";
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-07 23:52:31 +00:00
meta = with lib; {
maintainers = with maintainers; [ philiptaron ];
description = "A utility for encoding and decoding QR code images";
2023-11-07 23:52:31 +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";
2023-11-07 23:52:31 +00:00
};
}