2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-06-15 15:56:04 +00:00
|
|
|
, pythonOlder
|
2023-04-12 12:48:02 +00:00
|
|
|
, fetchFromGitHub
|
2020-06-15 15:56:04 +00:00
|
|
|
, importlib-metadata
|
2021-06-28 23:13:55 +00:00
|
|
|
, pyyaml
|
2023-04-12 12:48:02 +00:00
|
|
|
, setuptools
|
2022-09-09 14:08:57 +00:00
|
|
|
, unittestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-26 17:43:05 +00:00
|
|
|
pname = "markdown";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "3.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Python-Markdown";
|
|
|
|
repo = "markdown";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-YLOLDiS93zpjJWzkWXcutjZw9iB/FfbjxQXjau2B+JQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
2020-06-15 15:56:04 +00:00
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook pyyaml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
pythonImportsCheck = [ "markdown" ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/Python-Markdown/markdown/blob/${src.rev}/docs/changelog.md";
|
2023-04-12 12:48:02 +00:00
|
|
|
description = "Python implementation of John Gruber's Markdown";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "markdown_py";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Python-Markdown/markdown";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|