diff options
| author | Naïm Favier <n@monade.li> | 2023-02-11 14:03:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-11 14:03:56 +0100 |
| commit | 86a387351acf96b7137f5f385d978bf3681c7239 (patch) | |
| tree | 893ce1c726bda9df7ec2e3d1649ba811563570ab /pkgs/development/python-modules/gitpython | |
| parent | 5d012c4bb21fa9bee9f34339f95ef8fffa052d56 (diff) | |
| parent | d8d4f25cd2ba0af3a7d35ebce9e05d1eb58b03f4 (diff) | |
Merge branch 'master' into nixos/hostapd
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 ]; + }; +} |
