depot/third_party/nixpkgs/pkgs/by-name/qr/qrtool/package.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

42 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, asciidoctor
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "qrtool";
version = "0.10.1";
src = fetchFromGitHub {
owner = "sorairolake";
repo = "qrtool";
rev = "v${version}";
sha256 = "sha256-96k3VgxVGuKPLA4rD9B20AigFW03YvedT04UUzzmX38=";
};
cargoHash = "sha256-nAfW66vasnR0JHhz7n1XGA+OpPavOnGB6D6TfK9cr9Y=";
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 = "A 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";
};
}