about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/version-management/git-up/default.nix35
-rw-r--r--pkgs/top-level/all-packages.nix4
-rw-r--r--pkgs/top-level/python-packages.nix29
3 files changed, 38 insertions, 30 deletions
diff --git a/pkgs/applications/version-management/git-up/default.nix b/pkgs/applications/version-management/git-up/default.nix
new file mode 100644
index 0000000000000..c93ee92446631
--- /dev/null
+++ b/pkgs/applications/version-management/git-up/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, python2Packages, git }:
+
+python2Packages.buildPythonApplication rec {
+  version = "1.4.2";
+  name = "git-up-${version}";
+
+  src = fetchurl {
+    url = "mirror://pypi/g/git-up/${name}.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 = http://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;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 63cce742d7b23..fa69f9c8aaedd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1863,6 +1863,8 @@ in
 
   git-lfs = callPackage ../applications/version-management/git-lfs { };
 
+  git-up = callPackage ../applications/version-management/git-up { };
+
   gitfs = callPackage ../tools/filesystems/gitfs { };
 
   gitinspector = callPackage ../applications/version-management/gitinspector { };
@@ -14516,7 +14518,7 @@ in
   qscreenshot = callPackage ../applications/graphics/qscreenshot {
     qt = qt4;
   };
-  
+
   qsyncthingtray = qt5.callPackage ../applications/misc/qsyncthingtray { };
 
   qsynth = callPackage ../applications/audio/qsynth { };
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 06fe9cbf1b2f3..3f3b30bca2f73 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -7334,35 +7334,6 @@ in {
 
   };
 
-  git-up = buildPythonPackage rec {
-    version = "1.4.2";
-    name = "git-up-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/g/git-up/${name}.zip";
-      sha256 = "121ia5gyjy7js6fbsx9z98j2qpq7rzwpsj8gnfvsbz2d69g0vl7q";
-    };
-
-    buildInputs = with self; [ pkgs.git nose ];
-    propagatedBuildInputs = with self; [ click colorama docopt GitPython six termcolor ];
-
-    # git fails to run as it cannot detect the email address, so we set it
-    # $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"
-    '';
-
-    meta = {
-      homepage = http://github.com/msiemens/PyGitUp;
-      description = "A git pull replacement that rebases all local branches when pulling.";
-      license = licenses.mit;
-      maintainers = with maintainers; [ peterhoeg ];
-    };
-  };
-
   GitPython = buildPythonPackage rec {
     version = "2.0.8";
     name = "GitPython-${version}";