2020-06-16 16:20:46 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy27
|
2018-05-24 12:41:42 +01:00
|
|
|
, future, python-language-server, mypy, configparser
|
2020-06-16 16:20:46 +01:00
|
|
|
, pytestCheckHook, mock, isPy3k, pytestcov, coverage
|
|
|
|
, fetchpatch
|
2018-05-24 12:41:42 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyls-mypy";
|
2020-06-16 16:20:46 +01:00
|
|
|
version = "0.1.8";
|
2018-05-24 12:41:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomv564";
|
|
|
|
repo = "pyls-mypy";
|
|
|
|
rev = version;
|
2020-06-16 16:20:46 +01:00
|
|
|
sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb";
|
2018-05-24 12:41:42 +01:00
|
|
|
};
|
|
|
|
|
2020-06-16 16:20:46 +01:00
|
|
|
# presumably tests don't find typehints ?
|
|
|
|
doCheck = false;
|
2018-05-24 12:41:42 +01:00
|
|
|
|
2020-06-16 16:20:46 +01:00
|
|
|
disabledTests = [
|
|
|
|
"test_parse_line_without_line"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TEMPDIR
|
2018-05-24 12:41:42 +01:00
|
|
|
'';
|
|
|
|
|
2020-06-16 16:20:46 +01:00
|
|
|
patches = [
|
|
|
|
# makes future optional
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch";
|
|
|
|
sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [ mock pytestcov coverage pytestCheckHook ];
|
2018-05-24 12:41:42 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-06-16 16:20:46 +01:00
|
|
|
mypy python-language-server configparser
|
|
|
|
] ++ lib.optional (isPy27) [
|
|
|
|
future
|
2018-05-24 12:41:42 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/tomv564/pyls-mypy";
|
2018-08-10 13:22:59 +01:00
|
|
|
description = "Mypy plugin for the Python Language Server";
|
2018-05-24 12:41:42 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|