1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, substituteAll 5, git 6, gitdb 7, ddt 8, pythonOlder 9, typing-extensions 10}: 11 12buildPythonPackage rec { 13 pname = "gitpython"; 14 version = "3.1.27"; 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "gitpython-developers"; 19 repo = "GitPython"; 20 rev = version; 21 sha256 = "sha256-RA+6JFXHUQoXGErV8+aYuJPsfXzNSZK3kTm6eMbQIss="; 22 }; 23 24 patches = [ 25 (substituteAll { 26 src = ./hardcode-git-path.patch; 27 inherit git; 28 }) 29 ]; 30 31 propagatedBuildInputs = [ 32 gitdb 33 ddt 34 ] ++ lib.optionals (pythonOlder "3.10") [ 35 typing-extensions 36 ]; 37 38 # Tests require a git repo 39 doCheck = false; 40 41 pythonImportsCheck = [ "git" ]; 42 43 meta = with lib; { 44 description = "Python Git Library"; 45 homepage = "https://github.com/gitpython-developers/GitPython"; 46 license = licenses.bsd3; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}