Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / expenses / default.nix
blob220cd1178564fefac61913790a5f58e6eb90c1f3
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , sqlite
5 , installShellFiles
6 }:
8 buildGoModule rec {
9   pname = "expenses";
10   version = "0.2.3";
12   src = fetchFromGitHub {
13     owner = "manojkarthick";
14     repo = "expenses";
15     rev = "v${version}";
16     sha256 = "sha256-sqsogF2swMvYZL7Kj+ealrB1AAgIe7ZXXDLRdHL6Q+0=";
17   };
19   vendorHash = "sha256-rIcwZUOi6bdfiWZEsRF4kl1reNPPQNuBPHDOo7RQgYo=";
21   # package does not contain any tests as of v0.2.3
22   doCheck = false;
24   nativeBuildInputs = [ installShellFiles ];
26   buildInputs = [ sqlite ];
28   ldflags = [
29     "-s" "-w" "-X github.com/manojkarthick/expenses/cmd.Version=${version}"
30   ];
32   postInstall = ''
33     installShellCompletion --cmd expenses \
34       --bash <($out/bin/expenses completion bash) \
35       --zsh <($out/bin/expenses completion zsh) \
36       --fish <($out/bin/expenses completion fish)
37   '';
39   meta = with lib; {
40    description = "An interactive command line expense logger";
41    license = licenses.mit;
42    maintainers = [ maintainers.manojkarthick ];
43   };