timewarrior: install bash completion
The completions files are not installed by default, so we need to install them manually. This is done by adding the installShellFiles build input and calling installShellCompletion in postInstall.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, asciidoctor }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, asciidoctor, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "timewarrior";
|
||||
@@ -12,10 +12,15 @@ stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake asciidoctor ];
|
||||
nativeBuildInputs = [ cmake asciidoctor installShellFiles ];
|
||||
|
||||
dontUseCmakeBuildDir = true;
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd timew \
|
||||
--bash completion/timew-completion.bash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command-line time tracker";
|
||||
homepage = "https://timewarrior.net";
|
||||
|
||||
Reference in New Issue
Block a user