1{ 2 lib, 3 buildPythonPackage, 4 ddt, 5 fetchFromGitHub, 6 gitdb, 7 pkgs, 8 pythonOlder, 9 typing-extensions, 10}: 11 12buildPythonPackage rec { 13 pname = "gitpython"; 14 version = "3.1.44"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "gitpython-developers"; 21 repo = "GitPython"; 22 tag = version; 23 hash = "sha256-KnKaBv/tKk4wiGWUWCEgd1vgrTouwUhqxJ1/nMjRaWk="; 24 }; 25 26 propagatedBuildInputs = [ 27 ddt 28 gitdb 29 pkgs.gitMinimal 30 ] ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ]; 31 32 postPatch = '' 33 substituteInPlace git/cmd.py \ 34 --replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"' 35 ''; 36 37 # Tests require a git repo 38 doCheck = false; 39 40 pythonImportsCheck = [ "git" ]; 41 42 meta = with lib; { 43 description = "Python Git Library"; 44 homepage = "https://github.com/gitpython-developers/GitPython"; 45 changelog = "https://github.com/gitpython-developers/GitPython/blob/${src.tag}/doc/source/changes.rst"; 46 license = licenses.bsd3; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}