1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pyyaml,
6 six,
7 pytest,
8 pyaml,
9}:
10
11buildPythonPackage rec {
12 pname = "python-frontmatter";
13 version = "1.1.0";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "eyeseast";
18 repo = "python-frontmatter";
19 tag = "v${version}";
20 sha256 = "sha256-Sr0RbNVk87Zu01U7nkuPUSnl1bm6G72EZDP/eDn099s=";
21 };
22
23 propagatedBuildInputs = [
24 pyyaml
25 pyaml # yes, it's needed
26 six
27 ];
28
29 # tries to import test.test, which conflicts with module
30 # exported by python interpreter
31 doCheck = false;
32 nativeCheckInputs = [ pytest ];
33
34 pythonImportsCheck = [ "frontmatter" ];
35
36 meta = with lib; {
37 homepage = "https://github.com/eyeseast/python-frontmatter";
38 description = "Parse and manage posts with YAML (or other) frontmatter";
39 license = licenses.mit;
40 maintainers = with maintainers; [ siraben ];
41 platforms = platforms.unix;
42 };
43}