From 8f64b92d8fb54e17b9a8e80655f0fb1ed22d6f39 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 20 May 2022 17:39:07 +0200 Subject: [PATCH] python310Packages.rstcheck: 3.3.1 -> 5.0.0 --- .../python-modules/rstcheck/default.nix | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/rstcheck/default.nix b/pkgs/development/python-modules/rstcheck/default.nix index 606b2879908..5bf519e99ec 100644 --- a/pkgs/development/python-modules/rstcheck/default.nix +++ b/pkgs/development/python-modules/rstcheck/default.nix @@ -1,18 +1,50 @@ -{ lib, fetchFromGitHub, buildPythonPackage, docutils }: +{ lib +, buildPythonPackage +, docutils +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +, types-docutils +, typing-extensions +}: buildPythonPackage rec { pname = "rstcheck"; - version = "3.3.1"; + version = "5.0.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "myint"; repo = pname; rev = "v${version}"; - sha256 = "sha256-4AhENuT+LtUMCi+aaI/rKa2gHti8sKGLdVGjdRithXI="; + hash = "sha256-vTUa/eP6/flxRLBuzdHoNoPoGAg6XWwu922az8tLgJM="; }; - pythonImportsCheck = [ "rstcheck" ]; - propagatedBuildInputs = [ docutils ]; + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + docutils + types-docutils + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "rstcheck" + ]; + + preCheck = '' + # The tests need to find and call the rstcheck executable + export PATH="$PATH:$out/bin"; + ''; meta = with lib; { description = "Checks syntax of reStructuredText and code blocks nested within it";