Files
nixpkgs/pkgs/by-name/mb/mbake/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.3 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
installShellFiles,
python3Packages,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "mbake";
version = "1.4.1.pre";
pyproject = true;
src = fetchFromGitHub {
owner = "EbodShojaei";
repo = "bake";
tag = "v${version}";
hash = "sha256-HbBibwrd73GA0Z3xiYJAu1te7BADqsSkk0d99bMrwPw=";
};
build-system = [
installShellFiles
python3Packages.hatchling
];
dependencies = with python3Packages; [
rich
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 = [ "mbake" ];
meta = {
description = "Makefile formatter and linter";
homepage = "https://github.com/EbodShojaei/bake";
changelog = "https://github.com/EbodShojaei/bake/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
mainProgram = "mbake";
maintainers = [ lib.maintainers.amadejkastelic ];
};
}