diff options
| author | Mateo Diaz <mateodd@icloud.com> | 2023-02-03 22:08:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-03 22:08:25 -0800 |
| commit | 3bbb6e1413382997d5038ffed2d4f841530cee16 (patch) | |
| tree | bcf3004da77422a1a79e1da7f948c3c3bb86468e /pkgs/development/python-modules/gitpython | |
| parent | 50c64a63d07b31ed570984162edef784b8a3cf86 (diff) | |
| parent | 0a55d764ac14ac5e02fa386d5088f12e73f37e36 (diff) | |
Merge branch 'NixOS:master' into swww
Diffstat (limited to 'pkgs/development/python-modules/gitpython')
| -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..e5a98bb27d22 --- /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.30"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "gitpython-developers"; + repo = "GitPython"; + rev = version; + hash = "sha256-odtYBQLscncdC+NbDC9D84QQveDoimkQ6RzUQLJgizI="; + }; + + 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 ]; + }; +} |
