1{ lib, fetchurl, pythonPackages, git }:
2
3pythonPackages.buildPythonApplication rec {
4 pname = "git-up";
5 version = "1.6.1";
6
7 src = pythonPackages.fetchPypi {
8 inherit pname version;
9 sha256 = "0gs791yb0cndg9879vayvcj329jwhzpk6wrf9ri12l5hg8g490za";
10 };
11
12 # git should be on path for tool to work correctly
13 propagatedBuildInputs = [ git ] ++ (with pythonPackages; [ click colorama docopt GitPython six termcolor ]);
14
15 checkInputs = [ git pythonPackages.nose ]; # git needs to be on path
16 # 1. git fails to run as it cannot detect the email address, so we set it
17 # 2. $HOME is by default not a valid dir, so we have to set that too
18 # https://github.com/NixOS/nixpkgs/issues/12591
19 preCheck = ''
20 export HOME=$TMPDIR
21 git config --global user.email "nobody@example.com"
22 git config --global user.name "Nobody"
23 '';
24
25 postInstall = ''
26 rm -r $out/${pythonPackages.python.sitePackages}/PyGitUp/tests
27 '';
28
29 meta = with lib; {
30 homepage = "https://github.com/msiemens/PyGitUp";
31 description = "A git pull replacement that rebases all local branches when pulling";
32 license = licenses.mit;
33 maintainers = with maintainers; [ peterhoeg ];
34 platforms = platforms.all;
35 };
36}