1{ lib, buildPythonPackage, fetchFromGitHub, isPy27
2, future, python-language-server, mypy, configparser
3, pytestCheckHook, mock, pytest-cov, coverage
4, fetchpatch
5}:
6
7buildPythonPackage rec {
8 pname = "pyls-mypy";
9 version = "0.1.8";
10
11 src = fetchFromGitHub {
12 owner = "tomv564";
13 repo = "pyls-mypy";
14 rev = version;
15 sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb";
16 };
17
18 # presumably tests don't find typehints ?
19 doCheck = false;
20
21 disabledTests = [
22 "test_parse_line_without_line"
23 ];
24
25 preCheck = ''
26 export HOME=$TEMPDIR
27 '';
28
29 patches = [
30 # makes future optional
31 (fetchpatch {
32 url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch";
33 sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5";
34 })
35 ];
36
37 checkInputs = [ mock pytest-cov coverage pytestCheckHook ];
38
39 propagatedBuildInputs = [
40 mypy python-language-server configparser
41 ] ++ lib.optional (isPy27) [
42 future
43 ];
44
45 meta = with lib; {
46 homepage = "https://github.com/tomv564/pyls-mypy";
47 description = "Mypy plugin for the Python Language Server";
48 license = licenses.mit;
49 maintainers = [ ];
50 };
51}