about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorEmily <git@emilylange.de>2023-06-13 15:16:57 +0200
committerGitHub <noreply@github.com>2023-06-13 15:16:57 +0200
commit6215cd86026157ed9f9b6af3a6b2005eaa0cf4f5 (patch)
tree496d92cbd2996cb2b5564aa9518b67b8422de2cd /pkgs/applications/misc
parent57ff649c8cdfa8c0fac2291ef6e6294989eba680 (diff)
parent025cb1e9b0ed6a09f4f7cacbb2ffe9ccb1ad5287 (diff)
Merge pull request #237359 from joshuachp/feature-timew-completion
timewarrior: install bash completion
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/timewarrior/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/misc/timewarrior/default.nix b/pkgs/applications/misc/timewarrior/default.nix
index 0918b91f48c52..026f5ae5014eb 100644
--- a/pkgs/applications/misc/timewarrior/default.nix
+++ b/pkgs/applications/misc/timewarrior/default.nix
@@ -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";