47 lines
886 B
Nix
47 lines
886 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, isPy27
|
|
, substituteAll
|
|
, git
|
|
, gitdb
|
|
, ddt
|
|
, pythonOlder
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "GitPython";
|
|
version = "3.1.18";
|
|
disabled = isPy27; # no longer supported
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "b838a895977b45ab6f0cc926a9045c8d1c44e2b653c1fcc39fe91f42c6e8f05b";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./hardcode-git-path.patch;
|
|
inherit git;
|
|
})
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
gitdb
|
|
ddt
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
typing-extensions
|
|
];
|
|
|
|
# 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 ];
|
|
};
|
|
}
|