diff --git a/pkgs/applications/misc/expenses/default.nix b/pkgs/applications/misc/expenses/default.nix index c123acd469eb..2c31f24b6b1b 100644 --- a/pkgs/applications/misc/expenses/default.nix +++ b/pkgs/applications/misc/expenses/default.nix @@ -1,8 +1,8 @@ { lib - , buildGoModule , fetchFromGitHub , sqlite +, installShellFiles }: buildGoModule rec { @@ -21,12 +21,21 @@ buildGoModule rec { # package does not contain any tests as of v0.2.3 doCheck = false; + nativeBuildInputs = [ installShellFiles ]; + buildInputs = [ sqlite ]; ldflags = [ "-s" "-w" "-X github.com/manojkarthick/expenses/cmd.Version=${version}" ]; + postInstall = '' + installShellCompletion --cmd expenses \ + --bash <($out/bin/expenses completion bash) \ + --zsh <($out/bin/expenses completion zsh) \ + --fish <($out/bin/expenses completion fish) + ''; + meta = with lib; { description = "An interactive command line expense logger"; license = licenses.mit;