diff --git a/pkgs/development/python-modules/codecov/default.nix b/pkgs/development/python-modules/codecov/default.nix index 3b7ca324fd2c..20c80872fd0f 100644 --- a/pkgs/development/python-modules/codecov/default.nix +++ b/pkgs/development/python-modules/codecov/default.nix @@ -1,18 +1,22 @@ { lib , buildPythonPackage -, fetchPypi -, requests , coverage -, unittest2 +, ddt +, fetchFromGitHub +, mock +, pytestCheckHook +, requests }: buildPythonPackage rec { pname = "codecov"; version = "2.1.12"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-oNpGu1AlQm2ola+Qk43vjuEtN/y8u7wVttxkz368UcE="; + src = fetchFromGitHub { + owner = "codecov"; + repo = "codecov-python"; + rev = "v${version}"; + sha256 = "0bdk1cp3hxydpx9knqfv88ywwzw7yqhywi0inxjd6x53qh75prqy"; }; propagatedBuildInputs = [ @@ -20,14 +24,22 @@ buildPythonPackage rec { coverage ]; - checkInputs = [ unittest2 ]; + checkInputs = [ + ddt + mock + pytestCheckHook + ]; - postPatch = '' - sed -i 's/, "argparse"//' setup.py - ''; + pytestFlagsArray = [ "tests/test.py" ]; - # No tests in archive - doCheck = false; + disabledTests = [ + # No git repo available and network + "test_bowerrc_none" + "test_prefix" + "test_send" + ]; + + pythonImportsCheck = [ "codecov" ]; meta = with lib; { description = "Python report uploader for Codecov";