2 , buildPythonApplication
18 withPlugins = plugins: buildPythonApplication {
19 pname = "${package.pname}";
20 inherit (package) version;
23 disabled = pythonOlder "3.7";
34 makeWrapper ${package}/bin/mdformat $out/bin/mdformat \
35 --prefix PYTHONPATH : "${package}/${python3.sitePackages}:$PYTHONPATH"
36 ln -sfv ${package}/lib $out/lib
39 propagatedBuildInputs = package.propagatedBuildInputs ++ plugins;
41 passthru = package.passthru // {
42 withPlugins = morePlugins: withPlugins (morePlugins ++ plugins);
45 meta.mainProgram = "mdformat";
48 package = buildPythonPackage rec {
53 disabled = pythonOlder "3.7";
55 src = fetchFromGitHub {
56 owner = "executablebooks";
58 rev = "refs/tags/${version}";
59 hash = "sha256-umtfbhN6sDR/rFr1LwmJ21Ph9bK1Qq43bmMVzGCPD5s=";
67 propagatedBuildInputs = [
70 ] ++ lib.optionals (pythonOlder "3.10") [
72 ] ++ lib.optionals (pythonOlder "3.7") [
82 "test_no_codeblock_trailing_newline"
83 # Issue with upper/lower case
84 "default_style.md-options0"
87 pythonImportsCheck = [
91 passthru = { inherit withPlugins; };
94 description = "CommonMark compliant Markdown formatter";
95 homepage = "https://mdformat.rtfd.io/";
96 changelog = "https://github.com/executablebooks/mdformat/blob/${version}/docs/users/changelog.md";
97 license = with licenses; [ mit ];
98 maintainers = with maintainers; [ fab aldoborrero ];
99 mainProgram = "mdformat";