Unverified Commit 6fe03750 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

lima-bin: Fix completion generation (#331782)

parents ee9bcf01 a58bfa11
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -57,10 +57,17 @@ stdenvNoCC.mkDerivation {
    chmod +x $out/bin/limactl
    wrapProgram $out/bin/limactl \
      --prefix PATH : ${lib.makeBinPath [ qemu ]}

    # the shell completion only works with a patched $out/bin/limactl and so
    # needs to run after the autoPatchelfHook is executed in postFixup.
    doShellCompletion() {
      installShellCompletion --cmd limactl \
        --bash <($out/bin/limactl completion bash) \
        --fish <($out/bin/limactl completion fish) \
        --zsh <($out/bin/limactl completion zsh)
    }
    postFixupHooks+=(doShellCompletion)

    runHook postInstall
  '';