Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonApplication 3, fetchFromGitHub 4, git 5, pytestCheckHook 6, pytest-mock 7}: 8 9buildPythonApplication rec { 10 pname = "git-archive-all"; 11 version = "1.23.1"; 12 13 src = fetchFromGitHub { 14 owner = "Kentzo"; 15 repo = "git-archive-all"; 16 rev = version; 17 hash = "sha256-fIPjggOx+CEorj1bazz8s81ZdppkTL0OlA5tRqCYZyc="; 18 }; 19 20 # * Don't use pinned dependencies 21 # * Remove formatter and coverage generator 22 # * Don't fail on warnings. Almost all tests output this warning: 23 # ResourceWarning: unclosed file [...]/repo.tar 24 # https://github.com/Kentzo/git-archive-all/issues/90 25 postPatch = '' 26 substituteInPlace setup.cfg \ 27 --replace pycodestyle==2.5.0 "" \ 28 --replace pytest==5.2.2 pytest \ 29 --replace pytest-cov==2.8.1 "" \ 30 --replace pytest-mock==1.11.2 pytest-mock \ 31 --replace "--cov=git_archive_all --cov-report=term --cov-branch" "" \ 32 --replace "filterwarnings = error" "" 33 substituteInPlace test_git_archive_all.py \ 34 --replace "import pycodestyle" "" 35 ''; 36 37 nativeCheckInputs = [ 38 git 39 ]; 40 41 checkInputs = [ 42 pytestCheckHook 43 pytest-mock 44 ]; 45 46 disabledTests = [ "pycodestyle" ]; 47 48 preCheck = '' 49 export HOME="$(mktemp -d)" 50 ''; 51 52 meta = with lib; { 53 description = "Archive a repository with all its submodules"; 54 longDescription = '' 55 A python script wrapper for git-archive that archives a git superproject 56 and its submodules, if it has any. Takes into account .gitattributes 57 ''; 58 homepage = "https://github.com/Kentzo/git-archive-all"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ fgaz ]; 61 }; 62}