nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python310Packages.unittest-xml-reporting: enable tests, adopt

+24 -13
+24 -13
pkgs/development/python-modules/unittest-xml-reporting/default.nix
··· 1 - {lib, fetchPypi, buildPythonPackage, isPy27, six, lxml }: 1 + { lib 2 + , fetchFromGitHub 3 + , buildPythonPackage 4 + , lxml 5 + , pythonOlder 6 + , pytestCheckHook 7 + }: 2 8 3 9 buildPythonPackage rec { 4 10 pname = "unittest-xml-reporting"; 5 11 version = "3.2.0"; 6 - disabled = isPy27; 12 + disabled = pythonOlder "3.7"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "xmlrunner"; 16 + repo = "unittest-xml-reporting"; 17 + rev = version; 18 + sha256 = "sha256-lOJ/+8CVJUXdIaZLLF5PpPkG0DzlNgo46kRZ1Xy7Ju0="; 19 + }; 7 20 8 21 propagatedBuildInputs = [ 9 22 lxml 10 - six 11 23 ]; 12 24 13 - # The tarball from Pypi doesn't actually contain the unit tests 14 - doCheck = false; 25 + checkInputs = [ 26 + pytestCheckHook 27 + ]; 15 28 16 - src = fetchPypi { 17 - inherit pname version; 18 - sha256 = "sha256-7djTFwtAw6gbjPkQ9GxqMErihH7AEDbQLpwPm4V2LSg="; 19 - }; 29 + pythonImportsCheck = [ "xmlrunner" ]; 30 + 20 31 meta = with lib; { 21 - homepage = "https://github.com/xmlrunner/unittest-xml-reporting/tree/master/"; 22 - description = "A unittest runner that can save test results to XML files"; 23 - license = lib.licenses.bsd2; 24 - maintainers = with lib.maintainers; [ rprospero ]; 32 + homepage = "https://github.com/xmlrunner/unittest-xml-reporting"; 33 + description = "unittest-based test runner with Ant/JUnit like XML reporting"; 34 + license = licenses.bsd2; 35 + maintainers = with maintainers; [ rprospero SuperSandro2000 ]; 25 36 }; 26 37 }