diff --git a/pkgs/by-name/qr/qrtool/package.nix b/pkgs/by-name/qr/qrtool/package.nix index 9d653306d5f2..c03d8286d37f 100644 --- a/pkgs/by-name/qr/qrtool/package.nix +++ b/pkgs/by-name/qr/qrtool/package.nix @@ -7,18 +7,18 @@ installShellFiles, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "qrtool"; - version = "0.11.8"; + version = "0.12.1"; src = fetchFromGitHub { owner = "sorairolake"; repo = "qrtool"; - rev = "v${version}"; - hash = "sha256-f/2AaNnojtZMhJod6ukLwEq+Bsu6O2oTD9OWGL8IS80="; + tag = "v${finalAttrs.version}"; + hash = "sha256-I/LyDHV3pbRj+utzJBLvkgstEOodLkvfQT6uMLnOEgM="; }; - cargoHash = "sha256-wXs3Y0g+inUU3Qho5UhZOJhNDs65HS6FjPdZQBuwLM0="; + cargoHash = "sha256-c1sw0zyJZDvJe3Hcn1W4UPkqTKqRhywHpR6HLrqAN+A="; nativeBuildInputs = [ asciidoctor @@ -28,21 +28,20 @@ rustPlatform.buildRustPackage rec { postInstall = '' # Built by ./build.rs using `asciidoctor` installManPage ./target/*/release/build/qrtool*/out/*.? - '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd qrtool \ - --bash <($out/bin/qrtool --generate-completion bash) \ - --fish <($out/bin/qrtool --generate-completion fish) \ - --zsh <($out/bin/qrtool --generate-completion zsh) + --bash <($out/bin/qrtool completion bash) \ + --fish <($out/bin/qrtool completion fish) \ + --zsh <($out/bin/qrtool completion zsh) ''; - meta = with lib; { - maintainers = with maintainers; [ philiptaron ]; + meta = { description = "Utility for encoding and decoding QR code images"; - license = licenses.asl20; + 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 ]; }; -} +})