2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, docutils
|
|
|
|
, lxml
|
|
|
|
, pytestCheckHook
|
|
|
|
, wcag-contrast-ratio
|
|
|
|
}:
|
|
|
|
|
|
|
|
let pygments = buildPythonPackage
|
|
|
|
rec {
|
|
|
|
pname = "pygments";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "2.14.0";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Pygments";
|
|
|
|
inherit version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-s+0GqeismpquWm9dvniopYZV0XtDuTwHjwlN3Edq4pc=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
docutils
|
|
|
|
];
|
|
|
|
|
|
|
|
# circular dependencies if enabled by default
|
|
|
|
doCheck = false;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
lxml
|
|
|
|
pytestCheckHook
|
|
|
|
wcag-contrast-ratio
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# 5 lines diff, including one nix store path in 20000+ lines
|
|
|
|
"tests/examplefiles/bash/ltmain.sh"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pygments" ];
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
check = pygments.overridePythonAttrs (_: { doCheck = true; });
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://pygments.org/";
|
|
|
|
description = "A generic syntax highlighter";
|
2023-03-27 19:17:25 +00:00
|
|
|
mainProgram = "pygmentize";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.bsd2;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in pygments
|