567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
markdown-it-py,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mdformat";
|
|
version = "0.7.22";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "executablebooks";
|
|
repo = "mdformat";
|
|
tag = version;
|
|
hash = "sha256-WvbGCqfzh7KlNXIGJq09goiyLzVgU7c1+qmsLrIW38k=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ markdown-it-py ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "mdformat" ];
|
|
|
|
passthru = {
|
|
withPlugins = throw "Use pkgs.mdformat.withPlugins, i.e. the top-level attribute.";
|
|
};
|
|
|
|
meta = {
|
|
description = "CommonMark compliant Markdown formatter";
|
|
homepage = "https://mdformat.rtfd.io/";
|
|
changelog = "https://github.com/executablebooks/mdformat/blob/${version}/docs/users/changelog.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
fab
|
|
aldoborrero
|
|
];
|
|
mainProgram = "mdformat";
|
|
};
|
|
}
|