nixpkgs/pkgs/applications/misc/expenses/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1018 B
Nix
Raw Normal View History

2021-01-15 05:42:41 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, sqlite
2022-01-24 14:54:13 +00:00
, installShellFiles
}:
buildGoModule rec {
pname = "expenses";
2022-01-24 09:19:18 +00:00
version = "0.2.3";
src = fetchFromGitHub {
owner = "manojkarthick";
repo = "expenses";
rev = "v${version}";
2022-01-24 09:19:18 +00:00
sha256 = "sha256-sqsogF2swMvYZL7Kj+ealrB1AAgIe7ZXXDLRdHL6Q+0=";
};
2022-01-31 06:47:22 +00:00
vendorSha256 = "sha256-rIcwZUOi6bdfiWZEsRF4kl1reNPPQNuBPHDOo7RQgYo=";
2022-01-24 09:19:18 +00:00
# package does not contain any tests as of v0.2.3
doCheck = false;
2022-01-24 14:54:13 +00:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ sqlite ];
2021-08-26 06:45:51 +00:00
ldflags = [
"-s" "-w" "-X github.com/manojkarthick/expenses/cmd.Version=${version}"
];
2022-01-24 14:54:13 +00:00
postInstall = ''
installShellCompletion --cmd expenses \
--bash <($out/bin/expenses completion bash) \
--zsh <($out/bin/expenses completion zsh) \
--fish <($out/bin/expenses completion fish)
'';
2021-01-15 05:42:41 +00:00
meta = with lib; {
description = "An interactive command line expense logger";
license = licenses.mit;
maintainers = [ maintainers.manojkarthick ];
};
}