mbake: 1.2.4 -> 1.3.1; install completions (#423878)

This commit is contained in:
Aleksana
2025-07-23 09:53:50 +08:00
committed by GitHub
+13 -3
View File
@@ -1,23 +1,26 @@
{
stdenv,
lib,
fetchFromGitHub,
installShellFiles,
python3Packages,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "mbake";
version = "1.2.4";
version = "1.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "EbodShojaei";
repo = "bake";
tag = "v${version}";
hash = "sha256-RzM3HC3lYq93mngpqNCohcPMISWQ4+Lwa1V88S0O0To=";
hash = "sha256-gQsie4/iUIe4g6ZH8bL33xW6CNxSg/sh429P4Xv0GjQ=";
};
build-system = [
installShellFiles
python3Packages.hatchling
];
@@ -26,13 +29,20 @@ 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
];
versionCheckProgramArg = "--version";
pythonImportsCheck = [ "bake" ];
pythonImportsCheck = [ "mbake" ];
meta = {
description = "Makefile formatter and linter";