biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pygments / default.nix
blob007e36f172331e6f5174d1b125d40e846c84139b
2   lib,
3   buildPythonPackage,
4   fetchPypi,
6   # build-system
7   hatchling,
9   # tests
10   pytestCheckHook,
11   wcag-contrast-ratio,
12   pythonOlder
15 let
16   pygments = buildPythonPackage rec {
17     pname = "pygments";
18     version = "2.18.0";
19     pyproject = true;
21     disabled = pythonOlder "3.8"; # 2.18.0 requirement
23     src = fetchPypi {
24       inherit pname version;
25       hash = "sha256-eG/4AvMukTEb/ziJ9umoboFQX+mfJzW7bWCuDFAE8Zk=";
26     };
28     nativeBuildInputs = [ hatchling ];
30     # circular dependencies if enabled by default
31     doCheck = false;
33     nativeCheckInputs = [
34       pytestCheckHook
35       wcag-contrast-ratio
36     ];
38     disabledTestPaths = [
39       # 5 lines diff, including one nix store path in 20000+ lines
40       "tests/examplefiles/bash/ltmain.sh"
41     ];
43     pythonImportsCheck = [ "pygments" ];
45     passthru.tests = {
46       check = pygments.overridePythonAttrs (_: {
47         doCheck = true;
48       });
49     };
51     meta = {
52       changelog = "https://github.com/pygments/pygments/releases/tag/${version}";
53       homepage = "https://pygments.org/";
54       description = "Generic syntax highlighter";
55       mainProgram = "pygmentize";
56       license = lib.licenses.bsd2;
57       maintainers = with lib.maintainers; [ sigmanificient ];
58     };
59   };
61 pygments