Files
2026-05-08 14:28:33 -06:00

49 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
ddt,
fetchFromGitHub,
gitdb,
pkgs,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "gitpython";
version = "3.1.50";
pyproject = true;
src = fetchFromGitHub {
owner = "gitpython-developers";
repo = "GitPython";
tag = finalAttrs.version;
hash = "sha256-oHJrN/iYaAZUNPgOLS+8Ekr1eLES8APfXynmR4OySwk=";
};
postPatch = ''
substituteInPlace git/cmd.py \
--replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"'
'';
build-system = [ setuptools ];
dependencies = [
ddt
gitdb
pkgs.gitMinimal
];
# Tests require a git repo
doCheck = false;
pythonImportsCheck = [ "git" ];
meta = {
description = "Python Git Library";
homepage = "https://github.com/gitpython-developers/GitPython";
changelog = "https://github.com/gitpython-developers/GitPython/blob/${finalAttrs.src.tag}/doc/source/changes.rst";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
})