1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6
7 # build-system
8 setuptools,
9
10 # dependencies
11 mypy,
12 pytestCheckHook,
13 python-lsp-server,
14 tomli,
15}:
16
17buildPythonPackage rec {
18 pname = "pylsp-mypy";
19 version = "0.7.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchFromGitHub {
25 owner = "python-lsp";
26 repo = "pylsp-mypy";
27 tag = version;
28 hash = "sha256-rS0toZaAygNJ3oe3vfP9rKJ1A0avIdp5yjNx7oGOB4o=";
29 };
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 mypy
35 python-lsp-server
36 ]
37 ++ lib.optional (pythonOlder "3.11") tomli;
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 pythonImportsCheck = [ "pylsp_mypy" ];
42
43 disabledTests = [
44 # Tests wants to call dmypy
45 "test_option_overrides_dmypy"
46 ];
47
48 meta = {
49 description = "Mypy plugin for the Python LSP Server";
50 homepage = "https://github.com/python-lsp/pylsp-mypy";
51 changelog = "https://github.com/python-lsp/pylsp-mypy/releases/tag/${version}";
52 license = lib.licenses.mit;
53 maintainers = with lib.maintainers; [ cpcloud ];
54 };
55}