mbake: install completions

This commit is contained in:
Amadej Kastelic
2025-07-22 22:03:16 +02:00
parent c1e3dac45e
commit 560499df59
+10
View File
@@ -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