From 62a60ff1fd403ae19efca97de43779568babf377 Mon Sep 17 00:00:00 2001 From: MattKang <2027430+MattKang@users.noreply.github.com> Date: Mon, 29 Jul 2024 23:03:41 -0400 Subject: [PATCH] python312Packages.mdformat-wikilink: init at 0.2.0 --- .../mdformat-wikilink/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 1 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/mdformat-wikilink/default.nix diff --git a/pkgs/development/python-modules/mdformat-wikilink/default.nix b/pkgs/development/python-modules/mdformat-wikilink/default.nix new file mode 100644 index 0000000000000..ac3b0733aa653 --- /dev/null +++ b/pkgs/development/python-modules/mdformat-wikilink/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + markdown-it-py, + mdformat, + poetry-core, + pytestCheckHook, + pythonOlder, +}: + +buildPythonPackage rec { + pname = "mdformat-wikilink"; + version = "0.2.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "tmr232"; + repo = "mdformat-wikilink"; + rev = "v${version}"; + hash = "sha256-KOPh9iZfb3GCvslQeYBgqNaOyqtWi2llkaiWE7nmcJo="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + markdown-it-py + mdformat + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "mdformat_wikilink" ]; + + meta = with lib; { + description = "Mdformat plugin for ensuring that wiki-style links are preserved during formatting"; + homepage = "https://github.com/tmr232/mdformat-wikilink"; + license = licenses.mit; + maintainers = with maintainers; [ MattKang ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b439b90d1f374..020bbf3e2d04e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7814,6 +7814,7 @@ self: super: with self; { mdformat-simple-breaks = callPackage ../development/python-modules/mdformat-simple-breaks { }; mdformat-tables = callPackage ../development/python-modules/mdformat-tables { }; mdformat-toc = callPackage ../development/python-modules/mdformat-toc { }; + mdformat-wikilink = callPackage ../development/python-modules/mdformat-wikilink { }; mdit-py-plugins = callPackage ../development/python-modules/mdit-py-plugins { };