2020-06-15 15:56:04 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, future, python-language-server, mypy, configparser
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytestCheckHook, mock, pytest-cov, coverage
|
2020-06-15 15:56:04 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyls-mypy";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "0.1.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomv564";
|
|
|
|
repo = "pyls-mypy";
|
|
|
|
rev = version;
|
2020-06-15 15:56:04 +00:00
|
|
|
sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
# presumably tests don't find typehints ?
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_parse_line_without_line"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TEMPDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
patches = [
|
|
|
|
# makes future optional
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch";
|
|
|
|
sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = [ mock pytest-cov coverage pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-06-15 15:56:04 +00:00
|
|
|
mypy python-language-server configparser
|
|
|
|
] ++ lib.optional (isPy27) [
|
|
|
|
future
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/tomv564/pyls-mypy";
|
|
|
|
description = "Mypy plugin for the Python Language Server";
|
|
|
|
license = licenses.mit;
|
2021-07-04 02:40:35 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|