2021-01-15 05:42:41 +00:00
|
|
|
{ lib
|
2021-01-08 09:17:12 +00:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, sqlite
|
2022-01-24 14:54:13 +00:00
|
|
|
, installShellFiles
|
2021-01-08 09:17:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "expenses";
|
2022-01-24 09:19:18 +00:00
|
|
|
version = "0.2.3";
|
2021-01-08 09:17:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "manojkarthick";
|
|
|
|
repo = "expenses";
|
|
|
|
rev = "v${version}";
|
2022-01-24 09:19:18 +00:00
|
|
|
sha256 = "sha256-sqsogF2swMvYZL7Kj+ealrB1AAgIe7ZXXDLRdHL6Q+0=";
|
2021-01-08 09:17:12 +00:00
|
|
|
};
|
|
|
|
|
2023-09-13 04:44:46 +00:00
|
|
|
vendorHash = "sha256-rIcwZUOi6bdfiWZEsRF4kl1reNPPQNuBPHDOo7RQgYo=";
|
2021-01-08 09:17:12 +00:00
|
|
|
|
2022-01-24 09:19:18 +00:00
|
|
|
# package does not contain any tests as of v0.2.3
|
2021-01-08 09:17:12 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-01-24 14:54:13 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-01-08 09:17:12 +00:00
|
|
|
buildInputs = [ sqlite ];
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X github.com/manojkarthick/expenses/cmd.Version=${version}"
|
2021-01-08 09:17:12 +00:00
|
|
|
];
|
|
|
|
|
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; {
|
2021-01-08 09:17:12 +00:00
|
|
|
description = "An interactive command line expense logger";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.manojkarthick ];
|
|
|
|
};
|
|
|
|
}
|