1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5, pygments
6}:
7
8buildPythonPackage rec {
9 pname = "markdown2";
10 version = "2.4.8";
11
12 # PyPI does not contain tests, so using GitHub instead.
13 src = fetchFromGitHub {
14 owner = "trentm";
15 repo = "python-markdown2";
16 rev = version;
17 hash = "sha256-0T3HcfjEApEEWtNZGZcta85dY9d/0mSyRBlrqBQEQwk=";
18 };
19
20 nativeCheckInputs = [ pygments ];
21
22 checkPhase = ''
23 runHook preCheck
24
25 pushd test
26 ${python.interpreter} ./test.py -- -knownfailure
27 popd # test
28
29 runHook postCheck
30 '';
31
32 meta = with lib; {
33 changelog = "https://github.com/trentm/python-markdown2/blob/${src.rev}/CHANGES.md";
34 description = "A fast and complete Python implementation of Markdown";
35 homepage = "https://github.com/trentm/python-markdown2";
36 license = licenses.mit;
37 maintainers = with maintainers; [ hbunke ];
38 };
39}