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

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

46 lines
1 KiB
Nix
Raw Normal View History

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