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