2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-06 21:57:35 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, substituteAll
|
|
|
|
, git
|
|
|
|
, gitdb
|
|
|
|
, ddt
|
2021-06-28 23:13:55 +00:00
|
|
|
, pythonOlder
|
|
|
|
, 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";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "3.1.27";
|
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";
|
|
|
|
rev = version;
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-RA+6JFXHUQoXGErV8+aYuJPsfXzNSZK3kTm6eMbQIss=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-git-path.patch;
|
|
|
|
inherit git;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gitdb
|
|
|
|
ddt
|
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
|
|
|
|
|
|
|
# Tests require a git repo
|
|
|
|
doCheck = false;
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2021-02-05 17:12:51 +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";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|