Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / qc / default.nix
blob786ab73758a80b7b579a155bf40e3df1a96ecb76
1 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
3 buildGoModule rec {
4   pname = "qc";
5   version = "0.5.1";
7   src = fetchFromGitHub {
8     owner = "qownnotes";
9     repo = "qc";
10     rev = "v${version}";
11     hash = "sha256-SrvcRF2yRGGPTk835ykG+NH9WPoc/bXO5tSj43Q7T3g=";
12   };
14   vendorHash = "sha256-7t5rQliLm6pMUHhtev/kNrQ7AOvmA/rR93SwNQhov6o=";
16   ldflags = [
17     "-s" "-w" "-X=github.com/qownnotes/qc/cmd.version=${version}"
18   ];
20   # There are no automated tests
21   doCheck = false;
23   subPackages = [ "." ];
25   nativeBuildInputs = [
26     installShellFiles
27   ];
29   postInstall = ''
30     export HOME=$(mktemp -d)
31     installShellCompletion --cmd qc \
32       --bash <($out/bin/qc completion bash) \
33       --fish <($out/bin/qc completion fish) \
34       --zsh <($out/bin/qc completion zsh)
35   '';
37   meta = with lib; {
38     description = "QOwnNotes command-line snippet manager";
39     homepage = "https://github.com/qownnotes/qc";
40     license = licenses.mit;
41     maintainers = with maintainers; [ pbek totoroot ];
42   };