mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / development / python-modules / rstcheck / default.nix
blob206f9192d92aa9cb6cb98786b1c299a5338c65be
2   lib,
3   stdenv,
4   buildPythonPackage,
5   docutils,
6   fetchFromGitHub,
7   setuptools,
8   setuptools-scm,
9   pydantic,
10   pytestCheckHook,
11   pythonOlder,
12   rstcheck-core,
13   typer,
14   types-docutils,
17 buildPythonPackage rec {
18   pname = "rstcheck";
19   version = "6.2.4";
20   pyproject = true;
22   disabled = pythonOlder "3.8";
24   src = fetchFromGitHub {
25     owner = "rstcheck";
26     repo = "rstcheck";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-CB8UtYAJpPrUOGgHOIp9Ts0GaID6GdtKHWD/ihxRoNg=";
29   };
31   build-system = [
32     setuptools
33     setuptools-scm
34   ];
36   dependencies = [
37     docutils
38     rstcheck-core
39     types-docutils
40     pydantic
41     typer
42   ];
44   nativeCheckInputs = [ pytestCheckHook ];
46   disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
47     # Disabled until https://github.com/rstcheck/rstcheck-core/issues/19 is resolved.
48     "test_error_without_config_file_macos"
49     "test_file_1_is_bad_without_config_macos"
50   ];
52   pythonImportsCheck = [ "rstcheck" ];
54   preCheck = ''
55     # The tests need to find and call the rstcheck executable
56     export PATH="$PATH:$out/bin";
57   '';
59   meta = with lib; {
60     description = "Checks syntax of reStructuredText and code blocks nested within it";
61     homepage = "https://github.com/myint/rstcheck";
62     changelog = "https://github.com/rstcheck/rstcheck/blob/v${version}/CHANGELOG.md";
63     license = licenses.mit;
64     maintainers = with maintainers; [ staccato ];
65     mainProgram = "rstcheck";
66   };