2021-01-31 17:35:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-10-28 09:21:37 +00:00
|
|
|
, ddt
|
2021-08-03 07:07:28 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-31 17:35:40 +00:00
|
|
|
, gitdb
|
2022-10-28 09:21:37 +00:00
|
|
|
, pkgs
|
2021-06-21 13:55:03 +00:00
|
|
|
, pythonOlder
|
2022-10-28 09:21:37 +00:00
|
|
|
, substituteAll
|
2021-06-21 13:55:03 +00:00
|
|
|
, typing-extensions
|
2021-01-31 17:35:40 +00:00
|
|
|
}:
|
2018-05-12 14:52:04 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-08-03 07:07:28 +00:00
|
|
|
pname = "gitpython";
|
2023-08-04 18:06:54 +00:00
|
|
|
version = "3.1.32";
|
2022-10-28 09:21:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-08-03 07:07:28 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2018-05-12 14:52:04 +00:00
|
|
|
|
2021-08-03 07:07:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gitpython-developers";
|
|
|
|
repo = "GitPython";
|
2023-02-16 23:35:26 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-04 18:06:54 +00:00
|
|
|
hash = "sha256-Bhgu57w5QYfq5hlTh5gCJhbdwUMU+u0nrova/2V2ed0=";
|
2018-05-12 14:52:04 +00:00
|
|
|
};
|
|
|
|
|
2021-06-21 13:55:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ddt
|
2022-10-28 09:21:37 +00:00
|
|
|
gitdb
|
|
|
|
pkgs.gitMinimal
|
2021-07-23 11:32:20 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
2021-06-21 13:55:03 +00:00
|
|
|
typing-extensions
|
|
|
|
];
|
2018-05-12 14:52:04 +00:00
|
|
|
|
2022-10-28 09:21:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace git/cmd.py \
|
|
|
|
--replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"'
|
|
|
|
'';
|
|
|
|
|
2018-05-12 14:52:04 +00:00
|
|
|
# Tests require a git repo
|
|
|
|
doCheck = false;
|
2021-07-23 11:32:20 +00:00
|
|
|
|
2022-10-28 09:21:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"git"
|
|
|
|
];
|
2018-05-12 14:52:04 +00:00
|
|
|
|
2021-01-31 17:35:40 +00:00
|
|
|
meta = with lib; {
|
2018-05-12 14:52:04 +00:00
|
|
|
description = "Python Git Library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/gitpython-developers/GitPython";
|
2023-02-16 23:35:26 +00:00
|
|
|
changelog = "https://github.com/gitpython-developers/GitPython/blob/${version}/doc/source/changes.rst";
|
2021-01-31 17:35:40 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2018-05-12 14:52:04 +00:00
|
|
|
};
|
|
|
|
}
|