Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 52 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, ddt 4, fetchFromGitHub 5, gitdb 6, pkgs 7, pythonOlder 8, substituteAll 9, typing-extensions 10}: 11 12buildPythonPackage rec { 13 pname = "gitpython"; 14 version = "3.1.29"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "gitpython-developers"; 21 repo = "GitPython"; 22 rev = version; 23 hash = "sha256-RNDBoGWnkirPZjxn5oqH3zwYqVFLedNrSRpZOHU0j+w="; 24 }; 25 26 propagatedBuildInputs = [ 27 ddt 28 gitdb 29 pkgs.gitMinimal 30 ] ++ lib.optionals (pythonOlder "3.10") [ 31 typing-extensions 32 ]; 33 34 postPatch = '' 35 substituteInPlace git/cmd.py \ 36 --replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"' 37 ''; 38 39 # Tests require a git repo 40 doCheck = false; 41 42 pythonImportsCheck = [ 43 "git" 44 ]; 45 46 meta = with lib; { 47 description = "Python Git Library"; 48 homepage = "https://github.com/gitpython-developers/GitPython"; 49 license = licenses.bsd3; 50 maintainers = with maintainers; [ fab ]; 51 }; 52}