Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pylsp-mypy / default.nix
blob3a58796331143aecabd762b7c308140f47c25334
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , setuptools
6 , mypy
7 , pytestCheckHook
8 , python-lsp-server
9 , pythonOlder
10 , tomli
13 buildPythonPackage rec {
14   pname = "pylsp-mypy";
15   version = "0.6.7";
16   format = "pyproject";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "python-lsp";
22     repo = "pylsp-mypy";
23     rev = "refs/tags/${version}";
24     hash = "sha256-ZsNIw0xjxnU9Ue0C7TlhzVOCOCKEbCa2CsiiqeMb14I=";
25   };
27   patches = [
28     # https://github.com/python-lsp/pylsp-mypy/pull/64
29     (fetchpatch {
30       name = "fix-hanging-test.patch";
31       url = "https://github.com/python-lsp/pylsp-mypy/commit/90d28edb474135007804f1e041f88713a95736f9.patch";
32       hash = "sha256-3DVyUXVImRemXCuyoXlYbPJm6p8OnhBdEKmwjx88ets=";
33     })
34   ];
36   nativeBuildInputs = [
37     setuptools
38   ];
40   propagatedBuildInputs = [
41     mypy
42     python-lsp-server
43   ] ++ lib.optionals (pythonOlder "3.11") [
44     tomli
45   ];
47   nativeCheckInputs = [
48     pytestCheckHook
49   ];
51   pythonImportsCheck = [
52     "pylsp_mypy"
53   ];
55   disabledTests = [
56     # Tests wants to call dmypy
57     "test_option_overrides_dmypy"
58   ];
60   meta = with lib; {
61     description = "Mypy plugin for the Python LSP Server";
62     homepage = "https://github.com/python-lsp/pylsp-mypy";
63     license = licenses.mit;
64     maintainers = with maintainers; [ cpcloud ];
65   };