1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, docutils 6}: 7 8buildPythonPackage rec { 9 pname = "Pygments"; 10 version = "2.5.2"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"; 15 }; 16 17 patches = [ 18 (fetchpatch { 19 name = "CVE-2021-27291.patch"; 20 url = "https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14.patch"; 21 sha256 = "0ap7jgkmvkkzijabsgnfrwl376cjsxa4jmzvqysrkwpjq3q4rxpa"; 22 excludes = ["CHANGES"]; 23 }) 24 ]; 25 26 propagatedBuildInputs = [ docutils ]; 27 28 # Circular dependency with sphinx 29 doCheck = false; 30 31 meta = { 32 homepage = "https://pygments.org/"; 33 description = "A generic syntax highlighter"; 34 license = lib.licenses.bsd2; 35 maintainers = with lib.maintainers; [ ]; 36 }; 37}