about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/mdformat-frontmatter/default.nix
blob: 333cb565113023999c9412c47cc6598b044720be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-core
, linkify-it-py
, markdown-it-py
, mdformat
, mdit-py-plugins
, ruamel-yaml
, pythonOlder
}:

buildPythonPackage rec {
  pname = "mdformat-frontmatter";
  version = "2.0.8";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "butler54";
    repo = "mdformat-frontmatter";
    rev = "refs/tags/v${version}";
    hash = "sha256-2heQw8LL/ILY36oItBeQq33qjVBGT51qGG4CcCEDutA=";
  };

  nativeBuildInputs = [
    flit-core
  ];

  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";
    changelog = "https://github.com/butler54/mdformat-frontmatter/blob/v{version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ aldoborrero polarmutex ];
  };
}