Files
nixpkgs/pkgs/development/python-modules/markdown-it-py/default.nix
T
Michael Daniels 075e8c2c4f treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

90 lines
1.6 KiB
Nix

{
lib,
attrs,
buildPythonPackage,
commonmark,
fetchFromGitHub,
flit-core,
linkify-it-py,
markdown,
mdit-py-plugins,
mdurl,
mistletoe,
mistune,
myst-parser,
panflute,
pyyaml,
sphinx,
sphinx-book-theme,
sphinx-copybutton,
sphinx-design,
stdenv,
pytest-regressions,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "markdown-it-py";
version = "3.0.0";
pyproject = true;
src = fetchFromGitHub {
owner = "executablebooks";
repo = "markdown-it-py";
tag = "v${version}";
hash = "sha256-cmjLElJA61EysTUFMVY++Kw0pI4wOIXOyCY3To9fpQc=";
};
# fix downstrem usage of markdown-it-py[linkify]
pythonRelaxDeps = [ "linkify-it-py" ];
nativeBuildInputs = [
flit-core
];
propagatedBuildInputs = [ mdurl ];
nativeCheckInputs = [
pytest-regressions
pytestCheckHook
]
++ optional-dependencies.linkify;
# disable and remove benchmark tests
preCheck = ''
rm -r benchmarking
'';
doCheck = !stdenv.hostPlatform.isi686;
pythonImportsCheck = [ "markdown_it" ];
optional-dependencies = {
compare = [
commonmark
markdown
mistletoe
mistune
panflute
];
linkify = [ linkify-it-py ];
plugins = [ mdit-py-plugins ];
rtd = [
attrs
myst-parser
pyyaml
sphinx
sphinx-copybutton
sphinx-design
sphinx-book-theme
];
};
meta = {
description = "Markdown parser in Python";
homepage = "https://markdown-it-py.readthedocs.io/";
changelog = "https://github.com/executablebooks/markdown-it-py/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
mainProgram = "markdown-it";
};
}