summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-frontmatter/default.nix
blob: ea89d3c2b2ddd62f2bfa17625d2f760dcdd2e950 (plain)
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
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  pyyaml,
  six,
  pytest,
  pyaml,
}:

buildPythonPackage rec {
  pname = "python-frontmatter";
  version = "1.1.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "eyeseast";
    repo = "python-frontmatter";
    tag = "v${version}";
    sha256 = "sha256-Sr0RbNVk87Zu01U7nkuPUSnl1bm6G72EZDP/eDn099s=";
  };

  propagatedBuildInputs = [
    pyyaml
    pyaml # yes, it's needed
    six
  ];

  # tries to import test.test, which conflicts with module
  # exported by python interpreter
  doCheck = false;
  nativeCheckInputs = [ pytest ];

  pythonImportsCheck = [ "frontmatter" ];

  meta = {
    homepage = "https://github.com/eyeseast/python-frontmatter";
    description = "Parse and manage posts with YAML (or other) frontmatter";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ siraben ];
    platforms = lib.platforms.unix;
  };
}