1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 linkify-it-py,
7 markdown-it-py,
8 mdformat,
9 mdit-py-plugins,
10 ruamel-yaml,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "mdformat-frontmatter";
16 version = "2.0.8";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "butler54";
23 repo = "mdformat-frontmatter";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-2heQw8LL/ILY36oItBeQq33qjVBGT51qGG4CcCEDutA=";
26 };
27
28 nativeBuildInputs = [ flit-core ];
29
30 propagatedBuildInputs = [
31 mdformat
32 mdit-py-plugins
33 ruamel-yaml
34 ];
35
36 pythonImportsCheck = [ "mdformat_frontmatter" ];
37
38 meta = with lib; {
39 description = "Mdformat plugin to ensure frontmatter is respected";
40 homepage = "https://github.com/butler54/mdformat-frontmatter";
41 changelog = "https://github.com/butler54/mdformat-frontmatter/blob/v{version}/CHANGELOG.md";
42 license = licenses.mit;
43 maintainers = with maintainers; [
44 aldoborrero
45 polarmutex
46 ];
47 };
48}