2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, flit-core
|
2023-07-15 17:15:38 +00:00
|
|
|
, linkify-it-py
|
|
|
|
, markdown-it-py
|
|
|
|
, mdformat
|
|
|
|
, mdit-py-plugins
|
|
|
|
, ruamel-yaml
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mdformat-frontmatter";
|
|
|
|
version = "2.0.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "butler54";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-PhT5whtvvcYSs5gHQEsIvV1evhx7jR+3DWFMHrF0uMw=";
|
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildInputs = [
|
|
|
|
mdformat
|
|
|
|
mdit-py-plugins
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ruamel-yaml
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mdformat_frontmatter"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "mdformat plugin to ensure frontmatter is respected";
|
|
|
|
homepage = "https://github.com/butler54/mdformat-frontmatter";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ aldoborrero polarmutex ];
|
|
|
|
};
|
|
|
|
}
|