Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 ddt, 5 fetchFromGitHub, 6 gitdb, 7 pkgs, 8 pythonOlder, 9 substituteAll, 10 typing-extensions, 11}: 12 13buildPythonPackage rec { 14 pname = "gitpython"; 15 version = "3.1.43"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "gitpython-developers"; 22 repo = "GitPython"; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-HO6t5cOHyDJVz+Bma4Lkn503ZfDmiQxUfSLaSZtUrTk="; 25 }; 26 27 propagatedBuildInputs = [ 28 ddt 29 gitdb 30 pkgs.gitMinimal 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/${version}/doc/source/changes.rst"; 47 license = licenses.bsd3; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}