Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / pyls-mypy / default.nix
blobeaf069c8ccb45cfe2e20891745133202d2019929
1 { lib, buildPythonPackage, fetchFromGitHub, isPy27
2 , future, python-language-server, mypy, configparser
3 , pytestCheckHook, mock, pytestcov, coverage
4 , fetchpatch
5 }:
7 buildPythonPackage rec {
8   pname = "pyls-mypy";
9   version = "0.1.8";
11   src = fetchFromGitHub {
12     owner = "tomv564";
13     repo = "pyls-mypy";
14     rev = version;
15     sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb";
16   };
18   # presumably tests don't find typehints ?
19   doCheck = false;
21   disabledTests = [
22     "test_parse_line_without_line"
23   ];
25   preCheck = ''
26     export HOME=$TEMPDIR
27   '';
29   patches = [
30     # makes future optional
31     (fetchpatch {
32       url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch";
33       sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5";
34     })
35   ];
37   checkInputs = [ mock pytestcov coverage pytestCheckHook ];
39   propagatedBuildInputs = [
40     mypy python-language-server configparser
41   ] ++ lib.optional (isPy27) [
42     future
43   ];
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 = [ maintainers.mic92 ];
50   };