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