diff --git a/pkgs/development/python-modules/mdformat-myst/default.nix b/pkgs/development/python-modules/mdformat-myst/default.nix new file mode 100644 index 000000000000..01a5a327accb --- /dev/null +++ b/pkgs/development/python-modules/mdformat-myst/default.nix @@ -0,0 +1,49 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + flit-core, + mdformat, + mdformat-footnote, + mdformat-frontmatter, + mdformat-tables, + mdit-py-plugins, + ruamel-yaml, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "mdformat-myst"; + version = "0.2.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "executablebooks"; + repo = "mdformat-myst"; + tag = "v${version}"; + hash = "sha256-Ty9QOsOTCNfhdLVuLfD0x63OFfHhODr14i/dhN+Sqnc="; + }; + + build-system = [ flit-core ]; + + dependencies = [ + mdformat + mdformat-footnote + mdformat-frontmatter + mdformat-tables + mdit-py-plugins + ruamel-yaml + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "mdformat_myst" ]; + + meta = { + description = "Mdformat plugin for MyST compatibility"; + homepage = "https://github.com/executablebooks/mdformat-myst"; + changelog = "https://github.com/executablebooks/mdformat-myst/releases/tag/v${version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ mattkang ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7c4cc55a5389..e65338ef1001 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7513,6 +7513,7 @@ self: super: with self; { mdformat-frontmatter = callPackage ../development/python-modules/mdformat-frontmatter { }; mdformat-gfm = callPackage ../development/python-modules/mdformat-gfm { }; mdformat-mkdocs = callPackage ../development/python-modules/mdformat-mkdocs { }; + mdformat-myst = callPackage ../development/python-modules/mdformat-myst{ }; mdformat-nix-alejandra = callPackage ../development/python-modules/mdformat-nix-alejandra { }; mdformat-simple-breaks = callPackage ../development/python-modules/mdformat-simple-breaks { }; mdformat-tables = callPackage ../development/python-modules/mdformat-tables { };