about summary refs log tree commit diff
path: root/pkgs/applications/version-management/lab/default.nix
diff options
context:
space:
mode:
authorralismark <13449732+ralismark@users.noreply.github.com>2023-01-26 16:35:46 +1100
committerMatthieu Coudron <teto@users.noreply.github.com>2023-01-26 15:37:33 +0100
commit5b310f272b7f043ec25b19f738c07ae59a0b1203 (patch)
tree00427a4fd3eabfa04837726ec03a844dc7344fc1 /pkgs/applications/version-management/lab/default.nix
parentcb3fb49bf53d7e2f9eb1c9af8ff5b15ca15ed517 (diff)
lab: fix zsh completion
Diffstat (limited to 'pkgs/applications/version-management/lab/default.nix')
-rw-r--r--pkgs/applications/version-management/lab/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/applications/version-management/lab/default.nix b/pkgs/applications/version-management/lab/default.nix
index 754fa778fed90..f79b59b56396d 100644
--- a/pkgs/applications/version-management/lab/default.nix
+++ b/pkgs/applications/version-management/lab/default.nix
@@ -22,14 +22,16 @@ buildGoModule rec {
   ldflags = [ "-s" "-w" "-X main.version=${version}" ];
 
   postInstall = ''
-    # make xdg-open overrideable at runtime
-    wrapProgram $out/bin/lab \
-      --prefix PATH ":" "${lib.makeBinPath [ git ]}" \
-      --suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}"
+    # create shell completions before wrapProgram so that lab detects the right
+    # path for itself
     installShellCompletion --cmd lab \
       --bash <($out/bin/lab completion bash) \
       --fish <($out/bin/lab completion fish) \
       --zsh <($out/bin/lab completion zsh)
+    # make xdg-open overrideable at runtime
+    wrapProgram $out/bin/lab \
+      --prefix PATH ":" "${lib.makeBinPath [ git ]}" \
+      --suffix PATH ":" "${lib.makeBinPath [ xdg-utils ]}"
   '';
 
   meta = with lib; {