about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/git-up/default.nix
blob: ba0625c433de9fe0ac0de5e423adc61ed5fb348e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ stdenv, fetchurl, python2Packages, git }:

python2Packages.buildPythonApplication rec {
  version = "1.4.2";
  pname = "git-up";

  src = fetchurl {
    url = "mirror://pypi/g/git-up/${pname}-${version}.zip";
    sha256 = "121ia5gyjy7js6fbsx9z98j2qpq7rzwpsj8gnfvsbz2d69g0vl7q";
  };

  buildInputs = [ git ] ++ (with python2Packages; [ nose ]);
  propagatedBuildInputs = with python2Packages; [ click colorama docopt GitPython six termcolor ];

  # 1. git fails to run as it cannot detect the email address, so we set it
  # 2. $HOME is by default not a valid dir, so we have to set that too
  # https://github.com/NixOS/nixpkgs/issues/12591
  preCheck = ''
      export HOME=$TMPDIR
      git config --global user.email "nobody@example.com"
      git config --global user.name "Nobody"
    '';

  postInstall = ''
    rm -r $out/${python2Packages.python.sitePackages}/PyGitUp/tests
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/msiemens/PyGitUp;
    description = "A git pull replacement that rebases all local branches when pulling.";
    license = licenses.mit;
    maintainers = with maintainers; [ peterhoeg ];
    platforms = platforms.all;
    broken = true; # Incompatible with Git 2.15 object store.
  };
}