From d72ad7d4db0eff63ba16affbc259635b2e70f267 Mon Sep 17 00:00:00 2001 From: Aldo Borrero <82811+aldoborrero@users.noreply.github.com> Date: Fri, 30 Jun 2023 13:42:33 +0200 Subject: [PATCH] mdformat-tables: init at 0.4.1 --- .../mdformat-tables/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 1 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/mdformat-tables/default.nix diff --git a/pkgs/development/python-modules/mdformat-tables/default.nix b/pkgs/development/python-modules/mdformat-tables/default.nix new file mode 100644 index 000000000000..747029eab276 --- /dev/null +++ b/pkgs/development/python-modules/mdformat-tables/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, mdformat +, mdit-py-plugins +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "mdformat-tables"; + version = "0.4.1"; + format = "flit"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "executablebooks"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Q61GmaRxjxJh9GjyR8QCZOH0njFUtAWihZ9lFQJ2nQQ="; + }; + + buildInputs = [ + mdformat + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "mdformat_tables" + ]; + + meta = with lib; { + description = "An mdformat plugin for rendering tables"; + homepage = "https://github.com/executablebooks/mdformat-tables"; + 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 a429cd7c819e..aac342b0302b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6218,6 +6218,7 @@ self: super: with self; { mdformat-mkdocs = callPackage ../development/python-modules/mdformat-mkdocs { }; 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 { }; mdit-py-plugins = callPackage ../development/python-modules/mdit-py-plugins { };