Skip to content

Commit 0b809ab

Browse files
Merge pull request #334670 from philiptaron/issue-333254/gitlab-for-qrtool
qrtool: switch to GitLab
2 parents fdb981f + 24bf96e commit 0b809ab

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

pkgs/by-name/qr/qrtool/package.nix

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
1-
{ lib
2-
, stdenv
3-
, fetchFromGitHub
4-
, rustPlatform
5-
, asciidoctor
6-
, installShellFiles
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitLab,
5+
rustPlatform,
6+
asciidoctor,
7+
installShellFiles,
78
}:
89

910
rustPlatform.buildRustPackage rec {
1011
pname = "qrtool";
1112
version = "0.11.4";
1213

13-
src = fetchFromGitHub {
14+
src = fetchFromGitLab {
1415
owner = "sorairolake";
1516
repo = "qrtool";
1617
rev = "v${version}";
17-
sha256 = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA=";
18+
hash = "sha256-lD/xi2k5baZGUUixy/032jTBevr0uQIT/JmX+d+kPyA=";
1819
};
1920

2021
cargoHash = "sha256-lR/LusIgdA+G7YeSLHjxdcC96tOSqSyalVamS42ORs0=";
2122

22-
nativeBuildInputs = [ asciidoctor installShellFiles ];
23+
nativeBuildInputs = [
24+
asciidoctor
25+
installShellFiles
26+
];
2327

24-
postInstall = ''
25-
# Built by ./build.rs using `asciidoctor`
26-
installManPage ./target/*/release/build/qrtool*/out/*.?
28+
postInstall =
29+
''
30+
# Built by ./build.rs using `asciidoctor`
31+
installManPage ./target/*/release/build/qrtool*/out/*.?
2732
28-
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
29-
installShellCompletion --cmd qrtool \
30-
--bash <($out/bin/qrtool --generate-completion bash) \
31-
--fish <($out/bin/qrtool --generate-completion fish) \
32-
--zsh <($out/bin/qrtool --generate-completion zsh)
33-
'';
33+
''
34+
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
35+
installShellCompletion --cmd qrtool \
36+
--bash <($out/bin/qrtool --generate-completion bash) \
37+
--fish <($out/bin/qrtool --generate-completion fish) \
38+
--zsh <($out/bin/qrtool --generate-completion zsh)
39+
'';
3440

3541
meta = with lib; {
3642
maintainers = with maintainers; [ philiptaron ];

0 commit comments

Comments
 (0)