Merge pull request #334670 from philiptaron/issue-333254/gitlab-for-qrtool

qrtool: switch to GitLab
This commit is contained in:
Sandro 2024-08-14 23:19:40 +02:00 committed by GitHub
commit 0b809abb11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,36 +1,42 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, asciidoctor
, installShellFiles
{
lib,
stdenv,
fetchFromGitLab,
rustPlatform,
asciidoctor,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "qrtool";
version = "0.11.4";
src = fetchFromGitHub {
src = fetchFromGitLab {
owner = "sorairolake";
repo = "qrtool";
rev = "v${version}";
sha256 = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA=";
hash = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA=";
};
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/*.?
'' + 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)
'';
''
+ 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 ];