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