nixpkgs/pkgs/development/python-modules/pyls-mypy/default.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

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