Files
nixpkgs/pkgs/development/python-modules/markdown2/default.nix
T
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

55 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
python,
pygments,
pythonOlder,
wavedrom,
}:
buildPythonPackage rec {
pname = "markdown2";
version = "2.4.10";
format = "setuptools";
disabled = pythonOlder "3.5";
# PyPI does not contain tests, so using GitHub instead.
src = fetchFromGitHub {
owner = "trentm";
repo = "python-markdown2";
rev = version;
hash = "sha256-1Vs2OMQm/XBOEefV6W58X5hap91aTNuTx8UFf0285uk=";
};
nativeCheckInputs = [ pygments ];
checkPhase = ''
runHook preCheck
pushd test
${python.interpreter} ./test.py -- -knownfailure
popd # test
runHook postCheck
'';
passthru.optional-dependencies = {
code_syntax_highlighting = [ pygments ];
wavedrom = [ wavedrom ];
all = lib.flatten (
lib.attrValues (lib.filterAttrs (n: v: n != "all") passthru.optional-dependencies)
);
};
meta = with lib; {
changelog = "https://github.com/trentm/python-markdown2/blob/${src.rev}/CHANGES.md";
description = "Fast and complete Python implementation of Markdown";
mainProgram = "markdown2";
homepage = "https://github.com/trentm/python-markdown2";
license = licenses.mit;
maintainers = with maintainers; [ hbunke ];
};
}