Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 setuptools, 7 setuptools-git, 8 click, 9 jinja2, 10 lxml, 11 tabulate, 12 ruamel-yaml, 13 pytestCheckHook, 14 mock, 15}: 16 17buildPythonPackage rec { 18 pname = "pycobertura"; 19 version = "4.1.0"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "aconrad"; 26 repo = "pycobertura"; 27 tag = "v${version}"; 28 hash = "sha256-OzOxoF3OmgtzWuNNyecyxFRcPq8gAPQZ2XAdrkJjnhk="; 29 }; 30 31 postPatch = '' 32 # Remove build-system requirements as we handle them through Nix 33 sed -i '/\[build-system\]/,/build-backend/d' pyproject.toml 34 ''; 35 36 build-system = [ 37 setuptools 38 setuptools-git 39 ]; 40 41 dependencies = [ 42 click 43 jinja2 44 lxml 45 tabulate 46 ruamel-yaml 47 ]; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 mock 52 ]; 53 54 disabledTests = [ 55 # Tests require git and a git repository 56 "test_filesystem_git_integration" 57 "test_filesystem_git_integration__not_found" 58 "test_filesystem_git_has_file_integration" 59 "test_filesystem_git_has_file_integration__not_found" 60 "test_filesystem_factory" 61 ]; 62 63 pythonImportsCheck = [ "pycobertura" ]; 64 65 meta = { 66 description = "Cobertura coverage parser that can diff reports and show coverage progress"; 67 homepage = "https://github.com/aconrad/pycobertura"; 68 changelog = "https://github.com/aconrad/pycobertura/blob/${version}/CHANGES.md"; 69 license = lib.licenses.mit; 70 maintainers = with lib.maintainers; [ lovesegfault ]; 71 mainProgram = "pycobertura"; 72 }; 73}