Files
nixpkgs/pkgs/development/python-modules/gitpython/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
ddt,
fetchFromGitHub,
gitdb,
pkgs,
pythonOlder,
typing-extensions,
}:
buildPythonPackage rec {
pname = "gitpython";
version = "3.1.45";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "gitpython-developers";
repo = "GitPython";
tag = version;
hash = "sha256-VHnuHliZEc/jiSo/Zi9J/ipAykj7D6NttuzPZiE8svM=";
};
propagatedBuildInputs = [
ddt
gitdb
pkgs.gitMinimal
]
++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
postPatch = ''
substituteInPlace git/cmd.py \
--replace 'git_exec_name = "git"' 'git_exec_name = "${pkgs.gitMinimal}/bin/git"'
'';
# 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/${src.tag}/doc/source/changes.rst";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
}