diff --git a/pkgs/development/python-modules/pyls-mypy/default.nix b/pkgs/development/python-modules/pyls-mypy/default.nix index b4fd98607d8..b9cf9738ed4 100644 --- a/pkgs/development/python-modules/pyls-mypy/default.nix +++ b/pkgs/development/python-modules/pyls-mypy/default.nix @@ -1,29 +1,45 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib, buildPythonPackage, fetchFromGitHub, isPy27 , future, python-language-server, mypy, configparser -, pytest, mock, isPy3k, pytestcov, coverage +, pytestCheckHook, mock, isPy3k, pytestcov, coverage +, fetchpatch }: buildPythonPackage rec { pname = "pyls-mypy"; - version = "0.1.6"; + version = "0.1.8"; src = fetchFromGitHub { owner = "tomv564"; repo = "pyls-mypy"; rev = version; - sha256 = "0c1111m9h6f05frkyj6i757q9y2lijpbv8nxmwgp3nqbpkvfnmrk"; + sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb"; }; - disabled = !isPy3k; + # presumably tests don't find typehints ? + doCheck = false; - checkPhase = '' - HOME=$TEMPDIR pytest + disabledTests = [ + "test_parse_line_without_line" + ]; + + preCheck = '' + export HOME=$TEMPDIR ''; - checkInputs = [ pytest mock pytestcov coverage ]; + patches = [ + # makes future optional + (fetchpatch { + url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch"; + sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5"; + }) + ]; + + checkInputs = [ mock pytestcov coverage pytestCheckHook ]; propagatedBuildInputs = [ - mypy python-language-server future configparser + mypy python-language-server configparser + ] ++ lib.optional (isPy27) [ + future ]; meta = with lib; {