Files
nixpkgs/pkgs/development/python-modules/commonmark/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

47 lines
948 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
hypothesis,
python,
}:
buildPythonPackage rec {
pname = "commonmark";
version = "0.9.1";
pyproject = true;
src = fetchFromGitHub {
owner = "readthedocs";
repo = "commonmark.py";
tag = version;
hash = "sha256-Ui/G/VLdjWcm7YmVjZ5Q8h0DEEFqdDByre29g3zHUq4=";
};
build-system = [ setuptools ];
nativeCheckInputs = [ hypothesis ];
checkPhase = ''
runHook preCheck
${python.interpreter} commonmark/tests/run_spec_tests.py
${python.interpreter} commonmark/tests/unit_tests.py
export PATH=$out/bin:$PATH
cmark commonmark/tests/test.md
cmark commonmark/tests/test.md -a
cmark commonmark/tests/test.md -aj
runHook postCheck
'';
meta = {
description = "Python CommonMark parser ";
mainProgram = "cmark";
homepage = "https://github.com/readthedocs/commonmark.py";
license = lib.licenses.bsd3;
};
}