about summary refs log tree commit diff
path: root/pkgs/tools/misc/tmuxp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/tmuxp/default.nix')
-rw-r--r--pkgs/tools/misc/tmuxp/default.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/tools/misc/tmuxp/default.nix b/pkgs/tools/misc/tmuxp/default.nix
index b7cf5626e919..2b153d230f28 100644
--- a/pkgs/tools/misc/tmuxp/default.nix
+++ b/pkgs/tools/misc/tmuxp/default.nix
@@ -1,10 +1,6 @@
 { lib, python3Packages, fetchPypi, installShellFiles }:
 
-let
-  pypkgs = python3Packages;
-
-in
-pypkgs.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   pname = "tmuxp";
   version = "1.28.1";
 
@@ -19,11 +15,12 @@ pypkgs.buildPythonApplication rec {
   format = "pyproject";
 
   nativeBuildInputs = [
-    pypkgs.poetry-core
+    python3Packages.poetry-core
+    python3Packages.shtab
     installShellFiles
   ];
 
-  propagatedBuildInputs = with pypkgs; [
+  propagatedBuildInputs = with python3Packages; [
     click
     colorama
     kaptan
@@ -32,9 +29,8 @@ pypkgs.buildPythonApplication rec {
 
   postInstall = ''
     installShellCompletion --cmd tmuxp \
-      --bash <(_TMUXP_COMPLETE=bash_source $out/bin/tmuxp) \
-      --fish <(_TMUXP_COMPLETE=fish_source $out/bin/tmuxp) \
-      --zsh <(_TMUXP_COMPLETE=zsh_source $out/bin/tmuxp)
+      --bash <(shtab --shell=bash -u tmuxp.cli.create_parser) \
+      --zsh <(shtab --shell=zsh -u tmuxp.cli.create_parser)
   '';
 
   meta = with lib; {