depot/third_party/nixpkgs/pkgs/development/python-modules/GitPython/default.nix
Default email 14910f5943 Project import generated by Copybara.
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
2022-01-13 15:06:32 -05:00

49 lines
919 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, substituteAll
, git
, gitdb
, ddt
, pythonOlder
, typing-extensions
}:
buildPythonPackage rec {
pname = "gitpython";
version = "3.1.25";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "gitpython-developers";
repo = "GitPython";
rev = version;
sha256 = "sha256-ienc7zvLe6t8rkMtC6wVIewUqQBFdFbLc8iPT6aPVrE=";
};
patches = [
(substituteAll {
src = ./hardcode-git-path.patch;
inherit git;
})
];
propagatedBuildInputs = [
gitdb
ddt
] ++ lib.optionals (pythonOlder "3.10") [
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 ];
};
}