ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / markdown2 / default.nix
blob385fa8f89a9dcbb6b6c642fc77f25ee306cfd820
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , python
6 , pygments
7 }:
9 buildPythonPackage rec {
10   pname = "markdown2";
11   version = "2.4.3";
13   # PyPI does not contain tests, so using GitHub instead.
14   src = fetchFromGitHub {
15     owner = "trentm";
16     repo = "python-markdown2";
17     rev = version;
18     sha256 = "sha256-zNZ7/dDZbPIwcxSLvf8u5oaAgHLrZ6kk4vXNPUuZs/4=";
19   };
21   patches = [
22     (fetchpatch {
23       name = "SNYK-PYTHON-MARKDOWN2-2606985-xss.patch";  # no CVE (yet?)
24       url = "https://github.com/trentm/python-markdown2/commit/5898fcc1090ef7cd7783fa1422cc0e53cbca9d1b.patch";
25       sha256 = "sha256-M6kKxjHVC3O0BvDeEF4swzfpFsDO/LU9IHvfjK4hznA=";
26     })
27   ];
29   checkInputs = [ pygments ];
31   checkPhase = ''
32     runHook preCheck
34     pushd test
35     ${python.interpreter} ./test.py -- -knownfailure
36     popd  # test
38     runHook postCheck
39   '';
41   meta = with lib; {
42     description = "A fast and complete Python implementation of Markdown";
43     homepage =  "https://github.com/trentm/python-markdown2";
44     license = licenses.mit;
45     maintainers = with maintainers; [ hbunke ];
46   };