at master 1.1 kB view raw
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.45"; 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-VHnuHliZEc/jiSo/Zi9J/ipAykj7D6NttuzPZiE8svM="; 24 }; 25 26 propagatedBuildInputs = [ 27 ddt 28 gitdb 29 pkgs.gitMinimal 30 ] 31 ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ]; 32 33 postPatch = '' 34 substituteInPlace git/cmd.py \ 35 --replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"' 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 changelog = "https://github.com/gitpython-developers/GitPython/blob/${src.tag}/doc/source/changes.rst"; 47 license = licenses.bsd3; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}