Files
nixpkgs/pkgs/by-name/qr/qrtool/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
asciidoctor,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "qrtool";
version = "0.12.1";
src = fetchFromGitHub {
owner = "sorairolake";
repo = "qrtool";
tag = "v${finalAttrs.version}";
hash = "sha256-I/LyDHV3pbRj+utzJBLvkgstEOodLkvfQT6uMLnOEgM=";
};
cargoHash = "sha256-c1sw0zyJZDvJe3Hcn1W4UPkqTKqRhywHpR6HLrqAN+A=";
nativeBuildInputs = [
asciidoctor
installShellFiles
];
postInstall = ''
asciidoctor -b manpage docs/man/man1/*.1.adoc
installManPage docs/man/man1/*.1
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd qrtool \
--bash <($out/bin/qrtool completion bash) \
--fish <($out/bin/qrtool completion fish) \
--zsh <($out/bin/qrtool completion zsh)
'';
meta = {
description = "Utility for encoding and decoding QR code images";
license = lib.licenses.asl20;
homepage = "https://sorairolake.github.io/qrtool/book/index.html";
changelog = "https://sorairolake.github.io/qrtool/book/changelog.html";
mainProgram = "qrtool";
maintainers = with lib.maintainers; [ philiptaron ];
};
})