2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# tests
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, wcag-contrast-ratio
|
|
|
|
}:
|
|
|
|
|
|
|
|
let pygments = buildPythonPackage
|
|
|
|
rec {
|
|
|
|
pname = "pygments";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "2.15.1";
|
|
|
|
format = "pyproject";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "Pygments";
|
|
|
|
inherit version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-is5NPB3UgYlLIAX1YOrQ+fGe5k/pgzZr4aIeFx0Sd1w=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# circular dependencies if enabled by default
|
|
|
|
doCheck = false;
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
pytestCheckHook
|
|
|
|
wcag-contrast-ratio
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# 5 lines diff, including one nix store path in 20000+ lines
|
|
|
|
"tests/examplefiles/bash/ltmain.sh"
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pygments"
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
check = pygments.overridePythonAttrs (_: { doCheck = true; });
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/pygments/pygments/releases/tag/${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
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
|