diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/diff_cover/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/diff_cover/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/diff_cover/default.nix b/nixpkgs/pkgs/development/python-modules/diff_cover/default.nix new file mode 100644 index 000000000000..03b1f4fa28ee --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/diff_cover/default.nix @@ -0,0 +1,46 @@ +{ lib, buildPythonPackage, fetchPypi +, inflect +, jinja2 +, jinja2_pluralize +, pygments +, six +# test dependencies +, coverage +, flake8 +, mock +, nose +, pycodestyle +, pyflakes +, pylint +, pytest +}: + +buildPythonPackage rec { + pname = "diff_cover"; + version = "4.0.1"; + + preCheck = '' + export LC_ALL=en_US.UTF-8; + ''; + + src = fetchPypi { + inherit pname version; + sha256 = "61a98ec126552d985c0e3e3c33cc72e79d7577f91f6edba99f635411a173d3b9"; + }; + + propagatedBuildInputs = [ jinja2 jinja2_pluralize pygments six inflect ]; + + checkInputs = [ mock coverage pytest nose pylint pyflakes pycodestyle ]; + + # ignore tests which try to write files + checkPhase = '' + pytest -k 'not added_file_pylint_console and not file_does_not_exist' + ''; + + meta = with lib; { + description = "Automatically find diff lines that need test coverage"; + homepage = "https://github.com/Bachmann1234/diff-cover"; + license = licenses.asl20; + maintainers = with maintainers; [ dzabraev ]; + }; +} |