mbake: install completions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user