Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, docutils 5, lxml 6, pytestCheckHook 7, wcag-contrast-ratio 8}: 9 10let pygments = buildPythonPackage 11 rec { 12 pname = "pygments"; 13 version = "2.14.0"; 14 15 src = fetchPypi { 16 pname = "Pygments"; 17 inherit version; 18 hash = "sha256-s+0GqeismpquWm9dvniopYZV0XtDuTwHjwlN3Edq4pc="; 19 }; 20 21 propagatedBuildInputs = [ 22 docutils 23 ]; 24 25 # circular dependencies if enabled by default 26 doCheck = false; 27 nativeCheckInputs = [ 28 lxml 29 pytestCheckHook 30 wcag-contrast-ratio 31 ]; 32 33 disabledTestPaths = [ 34 # 5 lines diff, including one nix store path in 20000+ lines 35 "tests/examplefiles/bash/ltmain.sh" 36 ]; 37 38 pythonImportsCheck = [ "pygments" ]; 39 40 passthru.tests = { 41 check = pygments.overridePythonAttrs (_: { doCheck = true; }); 42 }; 43 44 meta = with lib; { 45 homepage = "https://pygments.org/"; 46 description = "A generic syntax highlighter"; 47 mainProgram = "pygmentize"; 48 license = licenses.bsd2; 49 maintainers = with maintainers; [ SuperSandro2000 ]; 50 }; 51 }; 52in pygments