From 8bc9bb67992d7c8a1d225886001e754f40ad568d Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 11 Aug 2025 19:36:12 +0300 Subject: [PATCH] docstrfmt: init at 1.10.0 https://github.com/LilSpazJoekp/docstrfmt --- pkgs/by-name/do/docstrfmt/package.nix | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pkgs/by-name/do/docstrfmt/package.nix diff --git a/pkgs/by-name/do/docstrfmt/package.nix b/pkgs/by-name/do/docstrfmt/package.nix new file mode 100644 index 000000000000..2fcfdbc28169 --- /dev/null +++ b/pkgs/by-name/do/docstrfmt/package.nix @@ -0,0 +1,56 @@ +{ + lib, + python3, + fetchFromGitHub, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "docstrfmt"; + version = "1.10.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "LilSpazJoekp"; + repo = "docstrfmt"; + tag = "v${version}"; + hash = "sha256-L7zz9FJRSiBWthME0zsUWHxeA+zVuxQpkyEVbNSSEQs="; + }; + + build-system = [ + python3.pkgs.flit-core + ]; + + dependencies = with python3.pkgs; [ + black + click + docutils + libcst + platformdirs + sphinx + tabulate + toml + ]; + + pythonRelaxDeps = [ + "black" + "docutils" + ]; + + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + pytest-aiohttp + ]; + + pythonImportsCheck = [ + "docstrfmt" + ]; + + meta = { + description = "Formatter for reStructuredText"; + homepage = "https://github.com/LilSpazJoekp/docstrfmt"; + changelog = "https://github.com/LilSpazJoekp/docstrfmt/blob/${src.tag}/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ doronbehar ]; + mainProgram = "docstrfmt"; + }; +}