From da7459f412d5003e77d56a676b90bae00c531e95 Mon Sep 17 00:00:00 2001 From: Aldo Borrero <82811+aldoborrero@users.noreply.github.com> Date: Fri, 30 Jun 2023 13:39:17 +0200 Subject: [PATCH] mdformat-gfm: init at 0.3.5 --- .../python-modules/mdformat-gfm/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 1 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/python-modules/mdformat-gfm/default.nix diff --git a/pkgs/development/python-modules/mdformat-gfm/default.nix b/pkgs/development/python-modules/mdformat-gfm/default.nix new file mode 100644 index 000000000000..2b48bcfa45de --- /dev/null +++ b/pkgs/development/python-modules/mdformat-gfm/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, linkify-it-py +, markdown-it-py +, mdformat +, mdformat-gfm +, mdformat-tables +, mdit-py-plugins +, poetry-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "mdformat-gfm"; + version = "0.3.5"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "hukkin"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-7sIa50jCN+M36Y0C05QaAL+TVwLzKxJ0gzpZI1YQFxg="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + buildInputs = [ + mdformat + markdown-it-py + mdit-py-plugins + ]; + + propagatedBuildInputs = [ + mdformat-tables + linkify-it-py + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mdformat_gfm" + ]; + + meta = with lib; { + description = "Mdformat plugin for GitHub Flavored Markdown compatibility"; + homepage = "https://github.com/hukkin/mdformat-gfm"; + license = licenses.mit; + maintainers = with maintainers; [ aldoborrero polarmutex ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fc17ba792684..6632d5ad8e60 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6214,6 +6214,7 @@ self: super: with self; { mdformat-beautysh = callPackage ../development/python-modules/mdformat-beautysh { }; mdformat-footnote = callPackage ../development/python-modules/mdformat-footnote { }; mdformat-frontmatter = callPackage ../development/python-modules/mdformat-frontmatter { }; + mdformat-gfm = callPackage ../development/python-modules/mdformat-gfm { }; mdit-py-plugins = callPackage ../development/python-modules/mdit-py-plugins { };