diff options
Diffstat (limited to 'pkgs/by-name/qr/qrtool/package.nix')
-rw-r--r-- | pkgs/by-name/qr/qrtool/package.nix | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/pkgs/by-name/qr/qrtool/package.nix b/pkgs/by-name/qr/qrtool/package.nix index cc017374317c0..8748c58c376b5 100644 --- a/pkgs/by-name/qr/qrtool/package.nix +++ b/pkgs/by-name/qr/qrtool/package.nix @@ -1,35 +1,42 @@ -{ lib -, stdenv -, fetchFromGitHub -, rustPlatform -, asciidoctor -, installShellFiles +{ + lib, + stdenv, + fetchFromGitLab, + rustPlatform, + asciidoctor, + installShellFiles, }: rustPlatform.buildRustPackage rec { pname = "qrtool"; - version = "0.10.13"; + version = "0.11.4"; - src = fetchFromGitHub { + src = fetchFromGitLab { owner = "sorairolake"; repo = "qrtool"; rev = "v${version}"; - sha256 = "sha256-8j9yn76yGzhqOgQsxpa9TsXU/19IpmZH8PsK2gvybls="; + hash = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA="; }; - cargoHash = "sha256-RPiwpNY3J07HMORfK+kDiMk1eagvIjm9B5nnuXJp0wk="; + cargoHash = "sha256-lR/LusIgdA+G7YeSLHjxdcC96tOSqSyalVamS42ORs0="; - nativeBuildInputs = [ asciidoctor installShellFiles ]; + nativeBuildInputs = [ + asciidoctor + installShellFiles + ]; - postInstall = '' - # Built by ./build.rs using `asciidoctor` - installManPage ./target/*/release/build/qrtool*/out/*.? + 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) - ''; + '' + + 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) + ''; meta = with lib; { maintainers = with maintainers; [ philiptaron ]; |