2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, docutils
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, types-docutils
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rstcheck";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "5.0.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "myint";
|
|
|
|
repo = pname;
|
2022-03-05 16:20:37 +00:00
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-vTUa/eP6/flxRLBuzdHoNoPoGAg6XWwu922az8tLgJM=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
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";
|
|
|
|
'';
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Checks syntax of reStructuredText and code blocks nested within it";
|
|
|
|
homepage = "https://github.com/myint/rstcheck";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ staccato ];
|
|
|
|
};
|
|
|
|
}
|