diff --git a/pkgs/by-name/mb/mbake/package.nix b/pkgs/by-name/mb/mbake/package.nix index b74b91d03f3b..55409a020ab1 100644 --- a/pkgs/by-name/mb/mbake/package.nix +++ b/pkgs/by-name/mb/mbake/package.nix @@ -1,6 +1,8 @@ { + stdenv, lib, fetchFromGitHub, + installShellFiles, python3Packages, versionCheckHook, }: @@ -18,6 +20,7 @@ python3Packages.buildPythonApplication rec { }; build-system = [ + installShellFiles python3Packages.hatchling ]; @@ -26,6 +29,13 @@ python3Packages.buildPythonApplication rec { typer ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd mbake \ + --bash <($out/bin/mbake completions bash) \ + --fish <($out/bin/mbake completions fish) \ + --zsh <($out/bin/mbake completions zsh) + ''; + nativeCheckInputs = [ python3Packages.pytestCheckHook versionCheckHook