diff --git a/pkgs/development/python-modules/mdformat-front-matters/default.nix b/pkgs/development/python-modules/mdformat-front-matters/default.nix new file mode 100644 index 000000000000..14752c8dae57 --- /dev/null +++ b/pkgs/development/python-modules/mdformat-front-matters/default.nix @@ -0,0 +1,62 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + uv-build, + + # dependencies + mdformat, + mdit-py-plugins, + ruamel-yaml, + toml, + + # tests + pytestCheckHook, + typing-extensions, +}: + +buildPythonPackage (finalAttrs: { + pname = "mdformat-front-matters"; + version = "2.0.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "kyleking"; + repo = "mdformat-front-matters"; + tag = "v${finalAttrs.version}"; + hash = "sha256-nfthUgOmKI57d+xLMmzveYPugzvvwkIzA//+CgvJGRw="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.9.10" "uv_build" + ''; + + build-system = [ + uv-build + ]; + + dependencies = [ + mdformat + mdit-py-plugins + ruamel-yaml + toml + ]; + + pythonImportsCheck = [ "mdformat_front_matters" ]; + + nativeCheckInputs = [ + pytestCheckHook + typing-extensions + ]; + + meta = { + description = "mdformat plugin to format YAML, TOML, or JSON front matter"; + homepage = "https://github.com/kyleking/mdformat-front-matters"; + changelog = "https://github.com/KyleKing/mdformat-front-matters/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +}) diff --git a/pkgs/development/python-modules/mdformat-frontmatter/default.nix b/pkgs/development/python-modules/mdformat-frontmatter/default.nix index 56d6ff7d04bb..8cb60804f62a 100644 --- a/pkgs/development/python-modules/mdformat-frontmatter/default.nix +++ b/pkgs/development/python-modules/mdformat-frontmatter/default.nix @@ -2,27 +2,34 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system flit-core, + + # dependencies mdformat, mdit-py-plugins, ruamel-yaml, + + # tests + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat-frontmatter"; - version = "2.0.8"; + version = "2.0.10"; pyproject = true; src = fetchFromGitHub { owner = "butler54"; repo = "mdformat-frontmatter"; - tag = "v${version}"; - hash = "sha256-2heQw8LL/ILY36oItBeQq33qjVBGT51qGG4CcCEDutA="; + tag = "v${finalAttrs.version}"; + hash = "sha256-snW9L9vnRHjNchhWZ5sIrn1r4piEYJeKQwib/4rarOo="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ flit-core ]; - propagatedBuildInputs = [ + dependencies = [ mdformat mdit-py-plugins ruamel-yaml @@ -30,14 +37,18 @@ buildPythonPackage rec { pythonImportsCheck = [ "mdformat_frontmatter" ]; + nativeCheckInputs = [ + pytestCheckHook + ]; + meta = { description = "Mdformat plugin to ensure frontmatter is respected"; homepage = "https://github.com/butler54/mdformat-frontmatter"; - changelog = "https://github.com/butler54/mdformat-frontmatter/blob/v${version}/CHANGELOG.md"; + changelog = "https://github.com/butler54/mdformat-frontmatter/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ aldoborrero polarmutex ]; }; -} +}) diff --git a/pkgs/development/python-modules/mdformat-gfm/default.nix b/pkgs/development/python-modules/mdformat-gfm/default.nix index 440915bbd91d..1e5afc0290f4 100644 --- a/pkgs/development/python-modules/mdformat-gfm/default.nix +++ b/pkgs/development/python-modules/mdformat-gfm/default.nix @@ -2,53 +2,55 @@ lib, buildPythonPackage, fetchFromGitHub, - linkify-it-py, + + # build-system + flit-core, + + # dependencies markdown-it-py, mdformat, - mdformat-tables, mdit-py-plugins, - poetry-core, + wcwidth, + + # tests pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat-gfm"; - version = "0.3.6"; + version = "1.0.0"; pyproject = true; src = fetchFromGitHub { owner = "hukkin"; repo = "mdformat-gfm"; - tag = version; - hash = "sha256-c1jJwyTL8IgQnIAJFoPSuJ8VEYgnQ4slZyV0bHlUHLQ="; + tag = finalAttrs.version; + hash = "sha256-Vijt5P3KRL4jkU8AI2lAsJkvFne/l3utUkjHUs8PQHI="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ + flit-core + ]; - propagatedBuildInputs = [ + dependencies = [ markdown-it-py mdformat - mdformat-tables mdit-py-plugins - linkify-it-py + wcwidth ]; nativeCheckInputs = [ pytestCheckHook ]; - disabledTests = [ - "test_default_style__api" - "test_default_style__cli" - ]; - pythonImportsCheck = [ "mdformat_gfm" ]; meta = { description = "Mdformat plugin for GitHub Flavored Markdown compatibility"; homepage = "https://github.com/hukkin/mdformat-gfm"; + changelog = "https://github.com/hukkin/mdformat-gfm/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ aldoborrero polarmutex ]; }; -} +}) diff --git a/pkgs/development/python-modules/mdformat-mkdocs/default.nix b/pkgs/development/python-modules/mdformat-mkdocs/default.nix index c824dd32655e..cd0aa4e37545 100644 --- a/pkgs/development/python-modules/mdformat-mkdocs/default.nix +++ b/pkgs/development/python-modules/mdformat-mkdocs/default.nix @@ -2,13 +2,15 @@ lib, buildPythonPackage, fetchFromGitHub, - flit-core, + + # build-system + uv-build, + mdformat-beautysh, mdformat-footnote, - mdformat-frontmatter, + mdformat-front-matters, mdformat-gfm, mdformat-simple-breaks, - mdformat-tables, mdformat, mdit-py-plugins, more-itertools, @@ -16,19 +18,26 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat-mkdocs"; - version = "4.4.2"; + version = "5.1.3"; pyproject = true; src = fetchFromGitHub { owner = "KyleKing"; repo = "mdformat-mkdocs"; - tag = "v${version}"; - hash = "sha256-u3IHqllknX6ilReXRVyZoDfqid8Ioe+zvC3wPh04HXo="; + tag = "v${finalAttrs.version}"; + hash = "sha256-PklT9LlaIQFG194zhHQhzR8kVe084Q+1Bo9180eOMd0="; }; - build-system = [ flit-core ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.9.10" "uv_build" + ''; + + build-system = [ + uv-build + ]; dependencies = [ mdformat @@ -42,10 +51,9 @@ buildPythonPackage rec { mdformat-beautysh # mdformat-config mdformat-footnote - mdformat-frontmatter + mdformat-front-matters # mdformat-ruff mdformat-simple-breaks - mdformat-tables # mdformat-web # mdformat-wikilink ]; @@ -66,8 +74,8 @@ buildPythonPackage rec { meta = { description = "Mdformat plugin for MkDocs"; homepage = "https://github.com/KyleKing/mdformat-mkdocs"; - changelog = "https://github.com/KyleKing/mdformat-mkdocs/releases/tag/${src.tag}"; + changelog = "https://github.com/KyleKing/mdformat-mkdocs/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ aldoborrero ]; }; -} +}) diff --git a/pkgs/development/python-modules/mdformat-myst/default.nix b/pkgs/development/python-modules/mdformat-myst/default.nix index 01a5a327accb..5d6465b29b9a 100644 --- a/pkgs/development/python-modules/mdformat-myst/default.nix +++ b/pkgs/development/python-modules/mdformat-myst/default.nix @@ -2,26 +2,32 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system flit-core, + + # dependencies mdformat, mdformat-footnote, - mdformat-frontmatter, - mdformat-tables, + mdformat-front-matters, + mdformat-gfm, mdit-py-plugins, ruamel-yaml, + + # tests pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat-myst"; - version = "0.2.1"; + version = "0.3.0"; pyproject = true; src = fetchFromGitHub { owner = "executablebooks"; repo = "mdformat-myst"; - tag = "v${version}"; - hash = "sha256-Ty9QOsOTCNfhdLVuLfD0x63OFfHhODr14i/dhN+Sqnc="; + tag = finalAttrs.version; + hash = "sha256-y0zN47eK0UqTHx6ft/OrczAjdHdmPKIByCnz1c1JURQ="; }; build-system = [ flit-core ]; @@ -29,8 +35,8 @@ buildPythonPackage rec { dependencies = [ mdformat mdformat-footnote - mdformat-frontmatter - mdformat-tables + mdformat-front-matters + mdformat-gfm mdit-py-plugins ruamel-yaml ]; @@ -42,8 +48,8 @@ buildPythonPackage rec { 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"; + changelog = "https://github.com/executablebooks/mdformat-myst/releases/tag/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ mattkang ]; }; -} +}) diff --git a/pkgs/development/python-modules/mdformat-nix-alejandra/default.nix b/pkgs/development/python-modules/mdformat-nix-alejandra/default.nix index 6eac79a7dc9e..df9f773e3af7 100644 --- a/pkgs/development/python-modules/mdformat-nix-alejandra/default.nix +++ b/pkgs/development/python-modules/mdformat-nix-alejandra/default.nix @@ -8,7 +8,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat-nix-alejandra"; version = "0.1.0"; pyproject = true; @@ -16,7 +16,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "aldoborrero"; repo = "mdformat-nix-alejandra"; - tag = version; + tag = finalAttrs.version; hash = "sha256-jUXApGsxCA+pRm4m4ZiHWlxmVkqCPx3A46oQdtyKz5g="; }; @@ -25,9 +25,12 @@ buildPythonPackage rec { --replace-fail '"alejandra"' '"${lib.getExe alejandra}"' ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ mdformat ]; + pythonRelaxDeps = [ + "mdformat" + ]; + dependencies = [ mdformat ]; pythonImportsCheck = [ "mdformat_nix_alejandra" ]; @@ -35,8 +38,9 @@ buildPythonPackage rec { meta = { description = "Mdformat plugin format Nix code blocks with alejandra"; + changelog = "https://github.com/aldoborrero/mdformat-nix-alejandra/releases/tag/${finalAttrs.src.tag}"; homepage = "https://github.com/aldoborrero/mdformat-nix-alejandra"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ aldoborrero ]; }; -} +}) diff --git a/pkgs/development/python-modules/mdformat-simple-breaks/default.nix b/pkgs/development/python-modules/mdformat-simple-breaks/default.nix index da2b68c1eab7..043d2ac18d3d 100644 --- a/pkgs/development/python-modules/mdformat-simple-breaks/default.nix +++ b/pkgs/development/python-modules/mdformat-simple-breaks/default.nix @@ -4,30 +4,40 @@ fetchFromGitHub, flit-core, mdformat, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat-simple-breaks"; - version = "0.0.1"; + version = "0.1.0"; pyproject = true; src = fetchFromGitHub { owner = "csala"; repo = "mdformat-simple-breaks"; - tag = "v${version}"; - hash = "sha256-4lJHB4r9lI2uGJ/BmFFc92sumTRKBBwiRmGBdQkzfd0="; + tag = "v${finalAttrs.version}"; + hash = "sha256-w0qPxIlCFMvs7p2Lya/ATkQN9wVt8ipsePZgonN/qpc="; }; - nativeBuildInputs = [ flit-core ]; + build-system = [ + flit-core + ]; - propagatedBuildInputs = [ mdformat ]; + dependencies = [ + mdformat + ]; pythonImportsCheck = [ "mdformat_simple_breaks" ]; + nativeCheckInputs = [ + pytestCheckHook + ]; + meta = { description = "Mdformat plugin to render thematic breaks using three dashes"; + changelog = "https://github.com/csala/mdformat-simple-breaks/releases/tag/${finalAttrs.src.tag}"; homepage = "https://github.com/csala/mdformat-simple-breaks"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ aldoborrero ]; }; -} +}) diff --git a/pkgs/development/python-modules/mdformat-tables/default.nix b/pkgs/development/python-modules/mdformat-tables/default.nix deleted file mode 100644 index 99ca4ca99ad5..000000000000 --- a/pkgs/development/python-modules/mdformat-tables/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - - # build dependencies - flit-core, - - # dependencies - mdformat, - wcwidth, - - # tests - pytestCheckHook, -}: - -buildPythonPackage rec { - pname = "mdformat-tables"; - version = "1.0.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "executablebooks"; - repo = "mdformat-tables"; - tag = "v${version}"; - hash = "sha256-7MbpGBGprhGrQ9P31HUU2h0bjyHWap6DETVN/dCDA1w="; - }; - - build-system = [ flit-core ]; - - dependencies = [ - mdformat - wcwidth - ]; - - nativeCheckInputs = [ pytestCheckHook ]; - - pythonImportsCheck = [ "mdformat_tables" ]; - - meta = { - description = "Mdformat plugin for rendering tables"; - homepage = "https://github.com/executablebooks/mdformat-tables"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ - aldoborrero - polarmutex - ]; - }; -} diff --git a/pkgs/development/python-modules/mdformat/default.nix b/pkgs/development/python-modules/mdformat/default.nix index e498e4c5c727..d818cf5f9a59 100644 --- a/pkgs/development/python-modules/mdformat/default.nix +++ b/pkgs/development/python-modules/mdformat/default.nix @@ -1,16 +1,17 @@ { lib, buildPythonPackage, + pythonOlder, fetchFromGitHub, + setuptools, markdown-it-py, pytestCheckHook, - pythonOlder, - setuptools, + versionCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mdformat"; - version = "0.7.22"; + version = "1.0.0"; pyproject = true; disabled = pythonOlder "3.12"; @@ -18,15 +19,18 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "executablebooks"; repo = "mdformat"; - tag = version; - hash = "sha256-WvbGCqfzh7KlNXIGJq09goiyLzVgU7c1+qmsLrIW38k="; + tag = finalAttrs.version; + hash = "sha256-fo4xO4Y89qPAggEjwuf6dnTyu1JzhZVdJyUqGNpti7g="; }; build-system = [ setuptools ]; dependencies = [ markdown-it-py ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + versionCheckHook + ]; pythonImportsCheck = [ "mdformat" ]; @@ -37,7 +41,7 @@ buildPythonPackage rec { meta = { description = "CommonMark compliant Markdown formatter"; homepage = "https://mdformat.rtfd.io/"; - changelog = "https://github.com/executablebooks/mdformat/blob/${version}/docs/users/changelog.md"; + changelog = "https://github.com/executablebooks/mdformat/blob/${finalAttrs.src.tag}/docs/users/changelog.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab @@ -45,4 +49,4 @@ buildPythonPackage rec { ]; mainProgram = "mdformat"; }; -} +}) diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 76cc374d42c7..f858cb4d6982 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -267,6 +267,7 @@ mapAliases { Markups = throw "'Markups' has been renamed to/replaced by 'markups'"; # Converted to throw 2025-10-29 mathlibtools = throw "mathlibtools has been removed because the upstream repository was archived in 2023"; # added 2025-07-09 matlink-gpapi = throw "'matlink-gpapi' has been removed as it was broken and unmaintained"; # Added 2025-11-09 + mdformat-tables = "'mdformat-tables' has been archived and replaced by 'mdformat-gfm"; # added 2025-01-25 MDP = throw "'MDP' has been renamed to/replaced by 'mdp'"; # Converted to throw 2025-10-29 MechanicalSoup = throw "'MechanicalSoup' has been renamed to/replaced by 'mechanicalsoup'"; # Converted to throw 2025-10-29 memcached = throw "'memcached' has been renamed to/replaced by 'python-memcached'"; # Converted to throw 2025-10-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c0f172b404a1..da84d3a7976f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9461,6 +9461,8 @@ self: super: with self; { mdformat-footnote = callPackage ../development/python-modules/mdformat-footnote { }; + mdformat-front-matters = callPackage ../development/python-modules/mdformat-front-matters { }; + mdformat-frontmatter = callPackage ../development/python-modules/mdformat-frontmatter { }; mdformat-gfm = callPackage ../development/python-modules/mdformat-gfm { }; @@ -9475,8 +9477,6 @@ 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 { };