diff options
| author | Vladimír Čunát <v@cunat.cz> | 2022-12-09 10:27:46 +0100 |
|---|---|---|
| committer | Vladimír Čunát <v@cunat.cz> | 2022-12-09 10:27:46 +0100 |
| commit | 9c497bb8d6015ee01fd78001539d73c3caa42eae (patch) | |
| tree | 96062a61d173626b1337ecef982421e81ae8d29a /pkgs/development/python-modules/gitpython/default.nix | |
| parent | 1f4a528dc10a88466f5b15198cf3be139b847e7e (diff) | |
| parent | 63c06ac400aa4d06fee7f32cb2504486862f2ff4 (diff) | |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/development/python-modules/gitpython/default.nix')
| -rw-r--r-- | pkgs/development/python-modules/gitpython/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/gitpython/default.nix b/pkgs/development/python-modules/gitpython/default.nix new file mode 100644 index 000000000000..e577a1e508a4 --- /dev/null +++ b/pkgs/development/python-modules/gitpython/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, ddt +, fetchFromGitHub +, gitdb +, pkgs +, pythonOlder +, substituteAll +, typing-extensions +}: + +buildPythonPackage rec { + pname = "gitpython"; + version = "3.1.29"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "gitpython-developers"; + repo = "GitPython"; + rev = version; + hash = "sha256-RNDBoGWnkirPZjxn5oqH3zwYqVFLedNrSRpZOHU0j+w="; + }; + + propagatedBuildInputs = [ + ddt + gitdb + pkgs.gitMinimal + ] ++ lib.optionals (pythonOlder "3.10") [ + typing-extensions + ]; + + postPatch = '' + substituteInPlace git/cmd.py \ + --replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"' + ''; + + # Tests require a git repo + doCheck = false; + + pythonImportsCheck = [ + "git" + ]; + + meta = with lib; { + description = "Python Git Library"; + homepage = "https://github.com/gitpython-developers/GitPython"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} |
