Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pygments / default.nix
blobf2b89cbcefd501799f344d4800deb13778717cf5
1 { lib
2 , buildPythonPackage
3 , fetchPypi
5 # build-system
6 , setuptools
8 # tests
9 , pytestCheckHook
10 , wcag-contrast-ratio
13 let pygments = buildPythonPackage
14   rec {
15     pname = "pygments";
16     version = "2.16.1";
17     format = "pyproject";
19     src = fetchPypi {
20       pname = "Pygments";
21       inherit version;
22       hash = "sha256-Ha/wSUggxpvIlB5AeqIPV3N07og2TuEKmP2+Cuzpbik=";
23     };
25     nativeBuildInputs = [
26       setuptools
27     ];
29     # circular dependencies if enabled by default
30     doCheck = false;
32     nativeCheckInputs = [
33       pytestCheckHook
34       wcag-contrast-ratio
35     ];
37     disabledTestPaths = [
38       # 5 lines diff, including one nix store path in 20000+ lines
39       "tests/examplefiles/bash/ltmain.sh"
40     ];
42     pythonImportsCheck = [
43       "pygments"
44     ];
46     passthru.tests = {
47       check = pygments.overridePythonAttrs (_: { doCheck = true; });
48     };
50     meta = with lib; {
51       changelog = "https://github.com/pygments/pygments/releases/tag/${version}";
52       homepage = "https://pygments.org/";
53       description = "A generic syntax highlighter";
54       mainProgram = "pygmentize";
55       license = licenses.bsd2;
56       maintainers = with maintainers; [ ];
57     };
58   };
59 in pygments