1{
2 lib,
3 fetchPypi,
4 python3Packages,
5 writableTmpDirAsHomeHook,
6 gitMinimal,
7}:
8
9python3Packages.buildPythonApplication rec {
10 pname = "git-up";
11 version = "2.3.0";
12 format = "pyproject";
13
14 src = fetchPypi {
15 pname = "git_up";
16 inherit version;
17 hash = "sha256-SncbnK6LxsleKRa/sSCm/8dsgPw/XJGvYfkcIeWYDy4=";
18 };
19
20 pythonRelaxDeps = [
21 "termcolor"
22 ];
23
24 build-system = with python3Packages; [
25 poetry-core
26 ];
27
28 # required in PATH for tool to work
29 propagatedBuildInputs = [ gitMinimal ];
30
31 dependencies = with python3Packages; [
32 colorama
33 gitpython
34 termcolor
35 ];
36
37 nativeCheckInputs = [
38 gitMinimal
39 python3Packages.pytest7CheckHook
40 writableTmpDirAsHomeHook
41 ];
42
43 # git fails without email address
44 preCheck = ''
45 git config --global user.email "nobody@example.com"
46 git config --global user.name "Nobody"
47 '';
48
49 postInstall = ''
50 rm -r $out/${python3Packages.python.sitePackages}/PyGitUp/tests
51 '';
52
53 meta = {
54 homepage = "https://github.com/msiemens/PyGitUp";
55 description = "Git pull replacement that rebases all local branches when pulling";
56 license = lib.licenses.mit;
57 maintainers = with lib.maintainers; [ peterhoeg ];
58 platforms = lib.platforms.all;
59 mainProgram = "git-up";
60 };
61}