diff --git a/pkgs/development/python-modules/codecov/default.nix b/pkgs/development/python-modules/codecov/default.nix index 2e8cbf29220c..20c80872fd0f 100644 --- a/pkgs/development/python-modules/codecov/default.nix +++ b/pkgs/development/python-modules/codecov/default.nix @@ -1,28 +1,50 @@ -{ lib, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }: +{ lib +, buildPythonPackage +, coverage +, ddt +, fetchFromGitHub +, mock +, pytestCheckHook +, requests +}: buildPythonPackage rec { pname = "codecov"; - version = "2.1.11"; + version = "2.1.12"; - src = fetchPypi { - inherit pname version; - sha256 = "6cde272454009d27355f9434f4e49f238c0273b216beda8472a65dc4957f473b"; + src = fetchFromGitHub { + owner = "codecov"; + repo = "codecov-python"; + rev = "v${version}"; + sha256 = "0bdk1cp3hxydpx9knqfv88ywwzw7yqhywi0inxjd6x53qh75prqy"; }; - checkInputs = [ unittest2 ]; # Tests only + propagatedBuildInputs = [ + requests + coverage + ]; - propagatedBuildInputs = [ requests coverage ]; + 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"; homepage = "https://codecov.io/"; license = licenses.asl20; + maintainers = with maintainers; [ fab ]; }; }