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