diff --git a/pkgs/applications/office/qownnotes/default.nix b/pkgs/applications/office/qownnotes/default.nix index 6afa12d8ce2a..d002cf5dffbc 100644 --- a/pkgs/applications/office/qownnotes/default.nix +++ b/pkgs/applications/office/qownnotes/default.nix @@ -14,6 +14,8 @@ , botan2 , pkg-config , nixosTests +, installShellFiles +, xvfb-run }: let @@ -34,6 +36,8 @@ stdenv.mkDerivation { qttools wrapQtAppsHook pkg-config + installShellFiles + xvfb-run ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ]; buildInputs = [ @@ -49,9 +53,16 @@ stdenv.mkDerivation { "USE_SYSTEM_BOTAN=1" ]; - postInstall = + postInstall = '' + installShellCompletion --cmd ${appname} \ + --bash <(xvfb-run $out/bin/${appname} --completion bash --allow-multiple-instances) \ + --fish <(xvfb-run $out/bin/${appname} --completion fish --allow-multiple-instances) + installShellCompletion --cmd ${pname} \ + --bash <(xvfb-run $out/bin/${appname} --completion bash --allow-multiple-instances) \ + --fish <(xvfb-run $out/bin/${appname} --completion fish --allow-multiple-instances) + '' # Create a lowercase symlink for Linux - lib.optionalString stdenv.isLinux '' + + lib.optionalString stdenv.isLinux '' ln -s $out/bin/${appname} $out/bin/${pname} '' # Wrap application for macOS as lowercase binary