about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/git-and-tools
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/version-management/git-and-tools
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/git-and-tools')
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile2
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix66
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix70
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix80
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix156
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/deps.nix38
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix17
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix20
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/deps.nix417
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix54
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix54
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile4
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix60
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix322
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch37
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch94
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch12
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/lab/deps.nix327
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/pre-commit/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix53
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix41
68 files changed, 3447 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix
new file mode 100644
index 000000000000..0d7729684163
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, jre, makeWrapper }:
+
+let
+  version = "1.13.0";
+  jarName = "bfg-${version}.jar";
+  mavenUrl = "http://central.maven.org/maven2/com/madgag/bfg/${version}/${jarName}";
+in
+  stdenv.mkDerivation {
+    inherit version jarName;
+
+    name = "bfg-repo-cleaner-${version}";
+
+    src = fetchurl {
+      url = mavenUrl;
+      sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz";
+    };
+
+    buildInputs = [ jre makeWrapper ];
+
+    phases = "installPhase";
+
+    installPhase = ''
+      mkdir -p $out/share/java
+      mkdir -p $out/bin
+      cp $src $out/share/java/$jarName
+      makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = https://rtyley.github.io/bfg-repo-cleaner/;
+      # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
+      description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
+      longDescription = ''
+        The BFG is a simpler, faster alternative to git-filter-branch for
+        cleansing bad data out of your Git repository history, in particular removing
+        crazy big files and removing passwords, credentials, and other private data.
+
+        The git-filter-branch command is enormously powerful and can do things
+        that the BFG can't - but the BFG is much better for the tasks above, because
+        it's faster (10-720x), simpler (dedicated to just removing things), and
+        beautiful (can use Scala instead of bash to script customizations).
+      '';
+      license = licenses.gpl3;
+      maintainers = [ maintainers.changlinli ];
+      platforms = platforms.unix;
+      downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";
+    };
+
+  }
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile
new file mode 100644
index 000000000000..8ed325154711
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'atlassian-stash'
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock
new file mode 100644
index 000000000000..61159eb3ee9e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock
@@ -0,0 +1,27 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    addressable (2.5.0)
+      public_suffix (~> 2.0, >= 2.0.2)
+    atlassian-stash (0.7.0)
+      commander (~> 4.1.2)
+      git (>= 1.2.5)
+      json (>= 1.7.5)
+      launchy (~> 2.4.2)
+    commander (4.1.6)
+      highline (~> 1.6.11)
+    git (1.3.0)
+    highline (1.6.21)
+    json (2.0.2)
+    launchy (2.4.3)
+      addressable (~> 2.3)
+    public_suffix (2.0.5)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  atlassian-stash
+
+BUNDLED WITH
+   1.13.6
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix
new file mode 100644
index 000000000000..341b50f0ef22
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix
@@ -0,0 +1,19 @@
+{ lib, bundlerEnv, ruby }:
+
+bundlerEnv rec {
+  name = "bitbucket-server-cli-${version}";
+
+  version = (import ./gemset.nix).atlassian-stash.version;
+  inherit ruby;
+  gemdir = ./.;
+
+  pname = "atlassian-stash";
+
+  meta = with lib; {
+    description = "A command line interface to interact with BitBucket Server (formerly Atlassian Stash)";
+    homepage    = https://bitbucket.org/atlassian/bitbucket-server-cli;
+    license     = licenses.mit;
+    maintainers = with maintainers; [ jgertm ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix
new file mode 100644
index 000000000000..a7c1406665e7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix
@@ -0,0 +1,66 @@
+{
+  addressable = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1j5r0anj8m4qlf2psnldip4b8ha2bsscv11lpdgnfh4nnchzjnxw";
+      type = "gem";
+    };
+    version = "2.5.0";
+  };
+  atlassian-stash = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1rsf9h5w5wiglwv0fqwp45fq06fxbg68cqkc3bpqvps1i1qm0p6i";
+      type = "gem";
+    };
+    version = "0.7.0";
+  };
+  commander = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0x9i8hf083wjlgj09nl1p9j8sr5g7amq0fdmxjqs4cxdbg3wpmsb";
+      type = "gem";
+    };
+    version = "4.1.6";
+  };
+  git = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3";
+      type = "gem";
+    };
+    version = "1.3.0";
+  };
+  highline = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "06bml1fjsnrhd956wqq5k3w8cyd09rv1vixdpa3zzkl6xs72jdn1";
+      type = "gem";
+    };
+    version = "1.6.21";
+  };
+  json = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1lhinj9vj7mw59jqid0bjn2hlfcnq02bnvsx9iv81nl2han603s0";
+      type = "gem";
+    };
+    version = "2.0.2";
+  };
+  launchy = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "190lfbiy1vwxhbgn4nl4dcbzxvm049jwc158r2x7kq3g5khjrxa2";
+      type = "gem";
+    };
+    version = "2.4.3";
+  };
+  public_suffix = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "040jf98jpp6w140ghkhw2hvc1qx41zvywx5gj7r2ylr1148qnj7q";
+      type = "gem";
+    };
+    version = "2.0.5";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix
new file mode 100644
index 000000000000..5bfd74344e8c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt
+, docbook_xsl, pkgconfig, luajit
+, groff, gzip, bzip2, xz
+, python, wrapPython, pygments, markdown
+}:
+
+stdenv.mkDerivation rec {
+  name = "cgit-${version}";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "https://git.zx2c4.com/cgit/snapshot/${name}.tar.xz";
+    sha256 = "1gw2j5xc5qdx2hwiwkr8h6kgya7v9d9ff9j32ga1dys0cca7qm1w";
+  };
+
+  # cgit is tightly coupled with git and needs a git source tree to build.
+  # IMPORTANT: Remember to check which git version cgit needs on every version
+  # bump (look for "GIT_VER" in the top-level Makefile).
+  gitSrc = fetchurl {
+    url    = "mirror://kernel/software/scm/git/git-2.18.0.tar.xz";
+    sha256 = "14hfwfkrci829a9316hnvkglnqqw1p03cw9k56p4fcb078wbwh4b";
+  };
+
+  nativeBuildInputs = [ pkgconfig ] ++ [ python wrapPython ];
+  buildInputs = [
+    openssl zlib asciidoc libxml2 libxslt docbook_xsl luajit
+  ];
+  pythonPath = [ pygments markdown ];
+
+  postPatch = ''
+    sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \
+        -e 's|"bzip2"|"${bzip2.bin}/bin/bzip2"|' \
+        -e 's|"xz"|"${xz.bin}/bin/xz"|' \
+        -i ui-snapshot.c
+
+    substituteInPlace filters/html-converters/man2html \
+      --replace 'groff' '${groff}/bin/groff'
+  '';
+
+  # Give cgit a git source tree and pass configuration parameters (as make
+  # variables).
+  preBuild = ''
+    mkdir -p git
+    tar --strip-components=1 -xf "$gitSrc" -C git
+
+    makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/")
+  '';
+
+  # Install manpage.
+  postInstall = ''
+    # xmllint fails:
+    #make install-man
+
+    # bypassing xmllint works:
+    a2x --no-xmllint -f manpage cgitrc.5.txt
+    mkdir -p "$out/share/man/man5"
+    cp cgitrc.5 "$out/share/man/man5"
+
+    wrapPythonProgramsIn "$out/lib/cgit/filters" "$out $pythonPath"
+  '';
+
+  meta = {
+    homepage = https://git.zx2c4.com/cgit/about/;
+    repositories.git = git://git.zx2c4.com/cgit;
+    description = "Web frontend for git repositories";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
new file mode 100644
index 000000000000..1af1870928ba
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchgit, ruby, gnugrep, diffutils, git, darcs }:
+
+stdenv.mkDerivation rec {
+  name = "darcs-to-git-${version}";
+  version = "2015-06-04";
+
+  src = fetchgit {
+    url = "git://github.com/purcell/darcs-to-git.git";
+    rev = "e5fee32495908fe0f7d700644c7b37347b7a0a5b";
+    sha256 = "0lxcx0x0m1cv2j4x9ykpjf6r2zg6lh5rya016x93vkmlzxm3f0ji";
+  };
+
+  patchPhase = let
+    matchExecution = ''(\<(output_of|system|run)\([^"%]*("|%w\()|^[^"`]*`)'';
+  in ''
+    sed -r -i \
+      -e '1s|^#!.*|#!${ruby}/bin/ruby|' \
+      -e 's!${matchExecution}git\>!\1${git}/bin/git!' \
+      -e 's!${matchExecution}darcs\>!\1${darcs}/bin/darcs!' \
+      -e 's!${matchExecution}diff\>!\1${diffutils}/bin/diff!' \
+      -e 's!\<egrep\>!${gnugrep}/bin/egrep!g' \
+      -e 's!%w\(darcs init\)!%w(${darcs}/bin/darcs init)!' \
+      darcs-to-git
+  '';
+
+  installPhase = ''
+    install -vD darcs-to-git "$out/bin/darcs-to-git"
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    orig_dir="$(pwd)"
+    darcs_repos="$(pwd)/darcs_test_repos"
+    git_repos="$(pwd)/git_test_repos"
+    test_home="$(pwd)/test_home"
+    mkdir "$darcs_repos" "$git_repos" "$test_home"
+    cd "$darcs_repos"
+    ${darcs}/bin/darcs init
+    echo "this is a test file" > new_file1
+    ${darcs}/bin/darcs add new_file1
+    HOME="$test_home" ${darcs}/bin/darcs record -a -m c1 -A none
+    echo "testfile1" > new_file1
+    echo "testfile2" > new_file2
+    ${darcs}/bin/darcs add new_file2
+    HOME="$test_home" ${darcs}/bin/darcs record -a -m c2 -A none
+    ${darcs}/bin/darcs mv new_file2 only_one_file
+    rm -f new_file1
+    HOME="$test_home" ${darcs}/bin/darcs record -a -m c3 -A none
+    cd "$git_repos"
+    HOME="$test_home" PATH= "$orig_dir/darcs-to-git" "$darcs_repos"
+    assertFileContents() {
+      echo -n "File $1 contains '$2'..." >&2
+      if [ "x$(cat "$1")" = "x$2" ]; then
+        echo " passed." >&2
+        return 0
+      else
+        echo " failed: '$(cat "$1")' != '$2'" >&2
+        return 1
+      fi
+    }
+    echo "Checking if converted repository matches original repository:" >&2
+    assertFileContents only_one_file testfile2
+    ${git}/bin/git reset --hard HEAD^
+    assertFileContents new_file1 testfile1
+    assertFileContents new_file2 testfile2
+    ${git}/bin/git reset --hard HEAD^
+    assertFileContents new_file1 "this is a test file"
+    echo "All checks passed." >&2
+    cd "$orig_dir"
+    rm -rf "$darcs_repos" "$git_repos" "$test_home"
+  '';
+
+  meta = {
+    description = "Converts a Darcs repository into a Git repository";
+    homepage = http://www.sanityinc.com/articles/converting-darcs-repositories-to-git;
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix
new file mode 100644
index 000000000000..9ee5df118308
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix
@@ -0,0 +1,156 @@
+/* All git-relates tools live here, in a separate attribute set so that users
+ * can get a fast overview over what's available.
+ */
+args @ {config, lib, pkgs}: with args; with pkgs;
+let
+  gitBase = callPackage ./git {
+    svnSupport = false;         # for git-svn support
+    guiSupport = false;         # requires tcl/tk
+    sendEmailSupport = false;   # requires plenty of perl libraries
+    perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey];
+    smtpPerlLibs = [
+      perlPackages.libnet perlPackages.NetSMTPSSL
+      perlPackages.IOSocketSSL perlPackages.NetSSLeay
+      perlPackages.AuthenSASL perlPackages.DigestHMAC
+    ];
+  };
+
+  self = rec {
+  # Try to keep this generally alphabetized
+
+  bfg-repo-cleaner = callPackage ./bfg-repo-cleaner { };
+
+  bitbucket-server-cli = callPackage ./bitbucket-server-cli { };
+
+  darcsToGit = callPackage ./darcs-to-git { };
+
+  diff-so-fancy = callPackage ./diff-so-fancy { };
+
+  ghq = callPackage ./ghq { };
+
+  git = appendToName "minimal" gitBase;
+
+  git-absorb = callPackage ./git-absorb {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  git-appraise = callPackage ./git-appraise {};
+
+  git-fame = callPackage ./git-fame {};
+
+  # The full-featured Git.
+  gitFull = gitBase.override {
+    svnSupport = true;
+    guiSupport = true;
+    sendEmailSupport = !stdenv.isDarwin;
+    withLibsecret = !stdenv.isDarwin;
+  };
+
+  # Git with SVN support, but without GUI.
+  gitSVN = lowPrio (appendToName "with-svn" (gitBase.override {
+    svnSupport = true;
+  }));
+
+  git-annex = pkgs.haskellPackages.git-annex;
+
+  git-annex-metadata-gui = libsForQt5.callPackage ./git-annex-metadata-gui {
+    inherit (python3Packages) buildPythonApplication pyqt5 git-annex-adapter;
+  };
+
+  git-annex-remote-b2 = callPackage ./git-annex-remote-b2 { };
+
+  git-annex-remote-rclone = callPackage ./git-annex-remote-rclone { };
+
+  git-bug = callPackage ./git-bug { };
+
+  # support for bugzilla
+  git-bz = callPackage ./git-bz { };
+
+  git-codeowners = callPackage ./git-codeowners { };
+
+  git-cola = callPackage ./git-cola { };
+
+  git-crypt = callPackage ./git-crypt { };
+
+  git-dit = callPackage ./git-dit {
+    inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
+  };
+
+  git-extras = callPackage ./git-extras { };
+
+  git-hub = callPackage ./git-hub { };
+
+  git-imerge = callPackage ./git-imerge { };
+
+  git-octopus = callPackage ./git-octopus { };
+
+  git-open = callPackage ./git-open { };
+
+  git-radar = callPackage ./git-radar { };
+
+  git-recent = callPackage ./git-recent {
+    utillinux = if stdenv.isLinux then utillinuxMinimal else utillinux;
+  };
+
+  git-remote-hg = callPackage ./git-remote-hg { };
+
+  git-reparent = callPackage ./git-reparent { };
+
+  git-secret = callPackage ./git-secret { };
+
+  git-secrets = callPackage ./git-secrets { };
+
+  git-stree = callPackage ./git-stree { };
+
+  git-sync = callPackage ./git-sync { };
+
+  git-test = callPackage ./git-test { };
+
+  git2cl = callPackage ./git2cl { };
+
+  gitFastExport = callPackage ./fast-export { };
+
+  gitRemoteGcrypt = callPackage ./git-remote-gcrypt { };
+
+  gitflow = callPackage ./gitflow { };
+
+  grv = callPackage ./grv { };
+
+  hub = callPackage ./hub {
+    inherit (darwin) Security;
+  };
+
+  hubUnstable = throw "use gitAndTools.hub instead";
+
+  lab = callPackage ./lab { };
+
+  pre-commit = callPackage ./pre-commit { };
+
+  pass-git-helper = python3Packages.callPackage ./pass-git-helper { };
+
+  qgit = qt5.callPackage ./qgit { };
+
+  stgit = callPackage ./stgit {
+  };
+
+  subgit = callPackage ./subgit { };
+
+  svn2git = callPackage ./svn2git {
+    git = gitSVN;
+  };
+
+  svn-all-fast-export = libsForQt5.callPackage ./svn-all-fast-export { };
+
+  tig = callPackage ./tig { };
+
+  topGit = callPackage ./topgit { };
+
+  transcrypt = callPackage ./transcrypt { };
+
+} // lib.optionalAttrs (config.allowAliases or true) (with self; {
+  # aliases
+  gitAnnex = git-annex;
+  svn_all_fast_export = svn-all-fast-export;
+});
+in
+  self
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
new file mode 100644
index 000000000000..988911d2eb7b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
@@ -0,0 +1,48 @@
+{stdenv, git, perl, ncurses, coreutils, fetchFromGitHub, makeWrapper, ...}:
+
+stdenv.mkDerivation rec {
+  name = "diff-so-fancy-${version}";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "so-fancy";
+    repo = "diff-so-fancy";
+    rev = "v${version}";
+    sha256 = "0j8dxfl4js7agwdpcvxwigzpp0lik33h7s3vsjg0pd413h2j4mvz";
+  };
+
+  # Perl is needed here for patchShebangs
+  nativeBuildInputs = [ perl makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib/diff-so-fancy
+
+    # diff-so-fancy executable searches for it's library relative to
+    # itself, so we are copying executable to lib, and only symlink it
+    # from bin/
+    cp diff-so-fancy $out/lib/diff-so-fancy
+    cp -r lib $out/lib/diff-so-fancy
+    ln -s $out/lib/diff-so-fancy/diff-so-fancy $out/bin
+
+    # ncurses is needed for `tput`
+    wrapProgram $out/lib/diff-so-fancy/diff-so-fancy \
+      --prefix PATH : "${git}/share/git/contrib/diff-highlight" \
+      --prefix PATH : "${git}/bin" \
+      --prefix PATH : "${coreutils}/bin" \
+      --prefix PATH : "${ncurses.out}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/so-fancy/diff-so-fancy;
+    description = "Good-looking diffs filter for git";
+    license = licenses.mit;
+    platforms = platforms.all;
+    longDescription = ''
+      diff-so-fancy builds on the good-lookin' output of git contrib's
+      diff-highlight to upgrade your diffs' appearances.
+    '';
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix
new file mode 100644
index 000000000000..fd50febb4699
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix
@@ -0,0 +1,41 @@
+{stdenv, fetchgit, mercurial, makeWrapper, subversion}:
+
+with stdenv.lib;
+stdenv.mkDerivation {
+  name = "fast-export";
+
+  src = fetchgit {
+    url = git://repo.or.cz/fast-export.git;
+    rev = "d202200fd9daa75cdb37d4cf067d4ca00e269535";
+    sha256 = "0m4llsg9rx4sza1kf39kxsdvhi6y87a18wm5k19c5r2h3vpylwcc";
+  };
+
+  buildInputs = [mercurial.python mercurial makeWrapper subversion];
+
+  dontBuild = true; # skip svn for now
+
+  # TODO also support svn stuff
+  # moving .py files into lib directory so that you can't pick the wrong file from PATH.
+  # This requires redefining ROOT
+  installPhase = ''
+    sed -i "s@/usr/bin/env.*@$(type -p python)@" *.py
+    l=$out/libexec/git-fast-export
+    mkdir -p $out/{bin,doc/git-fast-export} $l
+    sed -i "s@ROOT=.*@ROOT=$l@" *.sh
+    mv *.sh $out/bin
+    mv *.py $l
+    for p in $out/bin/*.sh; do
+      wrapProgram $p \
+        --prefix PYTHONPATH : "$(echo ${mercurial}/lib/python*/site-packages):$(echo ${mercurial.python}/lib/python*/site-packages)${stdenv.lib.concatMapStrings (x: ":$(echo ${x}/lib/python*/site-packages)") mercurial.pythonPackages or []}" \
+        --prefix PATH : "$(dirname $(type -p python))":$l
+    done
+  '';
+
+  meta = {
+    description = "Import svn, mercurial into git";
+    homepage = https://repo.or.cz/w/fast-export.git;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.koral ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix
new file mode 100644
index 000000000000..84a441641dfa
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "ghq-${version}";
+  version = "0.8.0";
+
+  goPackagePath = "github.com/motemen/ghq";
+
+  src = fetchFromGitHub {
+    owner = "motemen";
+    repo = "ghq";
+    rev = "v${version}";
+    sha256 = "1gdi0sbmq9kfi8hzd0dpgmhbmcf8q93jy3x08dd8smayrhbbwmld";
+  };
+
+  goDeps = ./deps.nix;
+
+  buildFlagsArray = ''
+    -ldflags=
+      -X=main.Version=${version}
+  '';
+
+  postInstall = ''
+    install -m 444 -D ${src}/zsh/_ghq $bin/share/zsh/site-functions/_ghq
+  '';
+
+  meta = {
+    description = "Remote repository management made easy";
+    homepage = https://github.com/motemen/ghq;
+    maintainers = with stdenv.lib.maintainers; [ sigma ];
+    license = stdenv.lib.licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/deps.nix
new file mode 100644
index 000000000000..1df37aa0f21f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/deps.nix
@@ -0,0 +1,38 @@
+[
+  {
+    goPackagePath = "github.com/daviddengcn/go-colortext";
+    fetch = {
+      type = "git";
+      url = "https://github.com/daviddengcn/go-colortext";
+      rev = "805cee6e0d43c72ba1d4e3275965ff41e0da068a";
+      sha256 = "0z0ggqnprqchnd8zyrz99w53kr4sgv372lyx12z5nsh9q342pmyf";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/go-homedir";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/go-homedir";
+      rev = "b8bc1bf767474819792c23f32d8286a45736f1c6";
+      sha256 = "13ry4lylalkh4g2vny9cxwvryslzyzwp9r92z0b10idhdq3wad1q";
+    };
+  }
+  {
+    goPackagePath = "github.com/motemen/go-colorine";
+    fetch = {
+      type = "git";
+      url = "https://github.com/motemen/go-colorine";
+      rev = "49ff36b8fa42db28092361cd20dcefd0b03b1472";
+      sha256 = "1rfi5gggf2sxb52whgxfl37p22r2xp27rndixbiicw6swllmml9l";
+    };
+  }
+  {
+    goPackagePath = "github.com/urfave/cli";
+    fetch = {
+      type = "git";
+      url = "https://github.com/urfave/cli";
+      rev = "f017f86fccc5a039a98f23311f34fdf78b014f78";
+      sha256 = "1biq4wl4z8l0ycinb39mfavnk13d0qnqqdplqybl7klxmk67cvhv";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
new file mode 100644
index 000000000000..17e2bfee40b5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  name = "git-absorb-${version}";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner  = "tummychow";
+    repo   = "git-absorb";
+    rev    = "refs/tags/${version}";
+    sha256 = "1dm442lyk7f44bshm2ajync5pzdwvdc5xfpw2lkvjzxflmh5572z";
+  };
+
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  cargoSha256 = "0fvxs09b9x38vp0psvlvbj09myxrhabp95pp3nz7nxsgr7fxflrr";
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "git commit --fixup, but automatic";
+    license = [ licenses.bsd3 ];
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix
new file mode 100644
index 000000000000..ba64a065d281
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, pyqt5, git-annex-adapter }:
+
+buildPythonApplication rec {
+  name = "git-annex-metadata-gui-${version}";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "alpernebbi";
+    repo = "git-annex-metadata-gui";
+    rev = "v${version}";
+    sha256 = "03kch67k0q9lcs817906g864wwabkn208aiqvbiyqp1qbg99skam";
+  };
+
+  prePatch = ''
+    substituteInPlace setup.py --replace "'PyQt5', " ""
+  '';
+
+  propagatedBuildInputs = [ pyqt5 git-annex-adapter ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/alpernebbi/git-annex-metadata-gui;
+    description = "Graphical interface for git-annex metadata commands";
+    maintainers = with maintainers; [ dotlambda ];
+    license = licenses.gpl3Plus;
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix
new file mode 100644
index 000000000000..4d0f33730e45
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, buildGoPackage, fetchgit }:
+
+buildGoPackage rec {
+  name = "git-annex-remote-b2-${version}";
+  version = "20151212-${stdenv.lib.strings.substring 0 7 rev}";
+  rev = "4db46b9fc9ef7b3f4851c2a6b061cb8f90f553ba";
+
+  goPackagePath = "github.com/encryptio/git-annex-remote-b2";
+
+  src = fetchgit {
+    inherit rev;
+    url = "https://github.com/encryptio/git-annex-remote-b2";
+    sha256 = "1139rzdvlj3hanqsccfinprvrzf4qjc5n4f0r21jp9j24yhjs6j2";
+  };
+
+  goDeps = ./deps.nix;
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix
new file mode 100644
index 000000000000..479b3e7d6372
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix
@@ -0,0 +1,20 @@
+[
+  {
+    goPackagePath = "github.com/pquerna/ffjson";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pquerna/ffjson";
+      rev = "674bc015b5b3f50f9bb2561179778586b9af68c5";
+      sha256 = "0l53q7b1g25hfjm1iyynfs413rpav4c51yvdr244ivw1x3hksa7a";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/kothar/go-backblaze.v0";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/kothar/go-backblaze.v0";
+      rev = "373819725fc560fa962c6cd883b533d2ebec4844";
+      sha256 = "1kmlwfnnfd4h46bb9pz2gw1hxqm1pzkwvidfmnc0zkrilaywk6fx";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix
new file mode 100644
index 000000000000..c368dcd487e8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, rclone, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "git-annex-remote-rclone-${version}";
+  version = "0.6";
+  rev = "v${version}";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "DanielDent";
+    repo = "git-annex-remote-rclone";
+    sha256 = "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-annex-remote-rclone $out/bin
+    wrapProgram "$out/bin/git-annex-remote-rclone" \
+      --prefix PATH ":" "${stdenv.lib.makeBinPath [ rclone ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/DanielDent/git-annex-remote-rclone;
+    description = "Use rclone supported cloud storage providers with git-annex";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.montag451 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix
new file mode 100644
index 000000000000..185ed38b5db0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "git-appraise-unstable-${version}";
+  version = "2018-02-26";
+  rev = "2414523905939525559e4b2498c5597f86193b61";
+
+  goPackagePath = "github.com/google/git-appraise";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "google";
+    repo = "git-appraise";
+    sha256 = "04xkp1jpas1dfms6i9j09bgkydih0q10nhwn75w9ds8hi2qaa3sa";
+  };
+
+  meta = {
+    description = "Distributed code review system for Git repos";
+    homepage = https://github.com/google/git-appraise;
+    license = stdenv.lib.licenses.asl20;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.vdemeester ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix
new file mode 100644
index 000000000000..7a47ed9a992d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub, python2Packages, stdenv, git, graphviz }:
+
+python2Packages.buildPythonApplication rec {
+  pname = "git-big-picture";
+  version = "0.10.1";
+
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "esc";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0b0zdq7d7k7f6p3wwc799347fraphbr20rxd1ysnc4xi1cj4wpmi";
+  };
+
+  buildInputs = [ git graphviz ];
+
+  postFixup = ''
+    wrapProgram $out/bin/git-big-picture \
+      --prefix PATH ":" ${ stdenv.lib.makeBinPath buildInputs  }
+    '';
+
+  meta = {
+    description = "Tool for visualization of Git repositories";
+    homepage = https://github.com/esc/git-big-picture;
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nthorne ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix
new file mode 100644
index 000000000000..eabc9258e29a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "git-bug-${version}";
+  version = "0.4.0";
+  rev = "2ab2412771d58a1b1f3bfeb5a6e9da2e683b0e12";
+  goPackagePath = "github.com/MichaelMure/git-bug";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "MichaelMure";
+    repo = "git-bug";
+    sha256 = "1zyvyg0p5h71wvyxrzkr1bwddxm3x8p44n6wh9ccfdxp8d2k6k25";
+  };
+
+  goDeps = ./deps.nix;
+
+  postInstall = ''
+    cd go/src/${goPackagePath}
+    install -D -m 0644 misc/bash_completion/git-bug "$bin/etc/bash_completion.d/git-bug"
+    install -D -m 0644 misc/zsh_completion/git-bug "$bin/share/zsh/site-functions/git-bug"
+    install -D -m 0644 -t "$bin/share/man/man1" doc/man/*
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Distributed bug tracker embedded in Git";
+    homepage = https://github.com/MichaelMure/git-bug;
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ royneary ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/deps.nix
new file mode 100644
index 000000000000..77d79602a9c1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/deps.nix
@@ -0,0 +1,417 @@
+# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
+[
+  {
+    goPackagePath  = "github.com/99designs/gqlgen";
+    fetch = {
+      type = "git";
+      url = "https://github.com/99designs/gqlgen";
+      rev =  "636435b68700211441303f1a5ed92f3768ba5774";
+      sha256 = "0d4sr6kpyn3zq3kpvk8lizy7hdpcw3fjmv7fbv2m1k9w8fzjawrz";
+    };
+  }
+  {
+    goPackagePath  = "github.com/agnivade/levenshtein";
+    fetch = {
+      type = "git";
+      url = "https://github.com/agnivade/levenshtein";
+      rev =  "3d21ba515fe27b856f230847e856431ae1724adc";
+      sha256 = "0dym3k3ycsj0zj0p4dhdp7gd2hm7c7pyh2wii1mdbmpdyipy99cd";
+    };
+  }
+  {
+    goPackagePath  = "github.com/cheekybits/genny";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cheekybits/genny";
+      rev =  "9127e812e1e9e501ce899a18121d316ecb52e4ba";
+      sha256 = "1z57ga9c2sjnl5ngqgb1ap0zqv36sk0rarm02bbbkipz4m9yabjg";
+    };
+  }
+  {
+    goPackagePath  = "github.com/corpix/uarand";
+    fetch = {
+      type = "git";
+      url = "https://github.com/corpix/uarand";
+      rev =  "2b8494104d86337cdd41d0a49cbed8e4583c0ab4";
+      sha256 = "06ml5m8l9wbr96gvyg6z1syawn797f8kmq74nhgry3vqpngyb6yn";
+    };
+  }
+  {
+    goPackagePath  = "github.com/cpuguy83/go-md2man";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cpuguy83/go-md2man";
+      rev =  "20f5889cbdc3c73dbd2862796665e7c465ade7d1";
+      sha256 = "1w22dfdamsq63b5rvalh9k2y7rbwfkkjs7vm9vd4a13h2ql70lg2";
+    };
+  }
+  {
+    goPackagePath  = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev =  "8991bc29aa16c548c550c7ff78260e27b9ab7c73";
+      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
+    };
+  }
+  {
+    goPackagePath  = "github.com/dustin/go-humanize";
+    fetch = {
+      type = "git";
+      url = "https://github.com/dustin/go-humanize";
+      rev =  "9f541cc9db5d55bce703bd99987c9d5cb8eea45e";
+      sha256 = "1kqf1kavdyvjk7f8kx62pnm7fbypn9z1vbf8v2qdh3y7z7a0cbl3";
+    };
+  }
+  {
+    goPackagePath  = "github.com/fatih/color";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fatih/color";
+      rev =  "5b77d2a35fb0ede96d138fc9a99f5c9b6aef11b4";
+      sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
+    };
+  }
+  {
+    goPackagePath  = "github.com/go-test/deep";
+    fetch = {
+      type = "git";
+      url = "https://github.com/go-test/deep";
+      rev =  "6592d9cc0a499ad2d5f574fde80a2b5c5cc3b4f5";
+      sha256 = "0f4rbdl6qmlq4bzh0443i634bm675bbrkyzwp8wkc1yhdl9qsij7";
+    };
+  }
+  {
+    goPackagePath  = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev =  "aa810b61a9c79d51363740d207bb46cf8e620ed5";
+      sha256 = "0kf4b59rcbb1cchfny2dm9jyznp8ri2hsb14n8iak1q8986xa0ab";
+    };
+  }
+  {
+    goPackagePath  = "github.com/google/go-cmp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/go-cmp";
+      rev =  "3af367b6b30c263d47e8895973edcca9a49cf029";
+      sha256 = "1fbv0x27k9sn8svafc0hjwsnckk864lv4yi7bvzrxvmd3d5hskds";
+    };
+  }
+  {
+    goPackagePath  = "github.com/gorilla/context";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gorilla/context";
+      rev =  "08b5f424b9271eedf6f9f0ce86cb9396ed337a42";
+      sha256 = "03p4hn87vcmfih0p9w663qbx9lpsf7i7j3lc7yl7n84la3yz63m4";
+    };
+  }
+  {
+    goPackagePath  = "github.com/gorilla/mux";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gorilla/mux";
+      rev =  "e3702bed27f0d39777b0b37b664b6280e8ef8fbf";
+      sha256 = "0pvzm23hklxysspnz52mih6h1q74vfrdhjfm1l3sa9r8hhqmmld2";
+    };
+  }
+  {
+    goPackagePath  = "github.com/gorilla/websocket";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gorilla/websocket";
+      rev =  "ea4d1f681babbce9545c9c5f3d5194a789c89f5b";
+      sha256 = "1bhgs2542qs49p1dafybqxfs2qc072xv41w5nswyrknwyjxxs2a1";
+    };
+  }
+  {
+    goPackagePath  = "github.com/hashicorp/golang-lru";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/golang-lru";
+      rev =  "20f1fb78b0740ba8c3cb143a61e86ba5c8669768";
+      sha256 = "12k2cp2k615fjvfa5hyb9k2alian77wivds8s65diwshwv41939f";
+    };
+  }
+  {
+    goPackagePath  = "github.com/icrowley/fake";
+    fetch = {
+      type = "git";
+      url = "https://github.com/icrowley/fake";
+      rev =  "4178557ae428460c3780a381c824a1f3aceb6325";
+      sha256 = "1mv4bxfphaqbvacy49v4lf4gf2nmadzpmjq0jbdx93wi5bnkc977";
+    };
+  }
+  {
+    goPackagePath  = "github.com/inconshreveable/mousetrap";
+    fetch = {
+      type = "git";
+      url = "https://github.com/inconshreveable/mousetrap";
+      rev =  "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75";
+      sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
+    };
+  }
+  {
+    goPackagePath  = "github.com/jroimartin/gocui";
+    fetch = {
+      type = "git";
+      url = "https://github.com/jroimartin/gocui";
+      rev =  "c055c87ae801372cd74a0839b972db4f7697ae5f";
+      sha256 = "1b1cbjg925l1c5v3ls8amni9716190yzf847cqs9wjnj82z8qa47";
+    };
+  }
+  {
+    goPackagePath  = "github.com/mattn/go-colorable";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-colorable";
+      rev =  "167de6bfdfba052fa6b2d3664c8f5272e23c9072";
+      sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
+    };
+  }
+  {
+    goPackagePath  = "github.com/mattn/go-isatty";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-isatty";
+      rev =  "0360b2af4f38e8d38c7fce2a9f4e702702d73a39";
+      sha256 = "06w45aqz2a6yrk25axbly2k5wmsccv8cspb94bfmz4izvw8h927n";
+    };
+  }
+  {
+    goPackagePath  = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev =  "9e777a8366cce605130a531d2cd6363d07ad7317";
+      sha256 = "0vkrfrz3fzn5n6ix4k8s0cg0b448459sldq8bp4riavsxm932jzb";
+    };
+  }
+  {
+    goPackagePath  = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev =  "fa473d140ef3c6adf42d6b391fe76707f1f243c8";
+      sha256 = "0f06q4fpzg0c370cvmpsl0iq2apl5nkbz5cd3nba5x5ysmshv1lm";
+    };
+  }
+  {
+    goPackagePath  = "github.com/nsf/termbox-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/nsf/termbox-go";
+      rev =  "5c94acc5e6eb520f1bcd183974e01171cc4c23b3";
+      sha256 = "1fi8imdgwvlsgifw2qfl3ww0lsrgkfsimkzz7bnrq41nar78s0fw";
+    };
+  }
+  {
+    goPackagePath  = "github.com/phayes/freeport";
+    fetch = {
+      type = "git";
+      url = "https://github.com/phayes/freeport";
+      rev =  "b8543db493a5ed890c5499e935e2cad7504f3a04";
+      sha256 = "1gwaan8fwmc5lfx4dzymq0jd6z2l1frg83jkmjpm4kw8ay4vr11q";
+    };
+  }
+  {
+    goPackagePath  = "github.com/pkg/errors";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/errors";
+      rev =  "645ef00459ed84a119197bfb8d8205042c6df63d";
+      sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
+    };
+  }
+  {
+    goPackagePath  = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev =  "792786c7400a136282c1664665ae0a8db921c6c2";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+  {
+    goPackagePath  = "github.com/russross/blackfriday";
+    fetch = {
+      type = "git";
+      url = "https://github.com/russross/blackfriday";
+      rev =  "55d61fa8aa702f59229e6cff85793c22e580eaf5";
+      sha256 = "0qmavm5d14kj6im6sqzpqnlhpy524428vkn4hnfwknndr9rycmn0";
+    };
+  }
+  {
+    goPackagePath  = "github.com/shurcooL/githubv4";
+    fetch = {
+      type = "git";
+      url = "https://github.com/shurcooL/githubv4";
+      rev =  "b5f70540eee0ebfb6a27b52fc5b131be76415539";
+      sha256 = "0hrjk16l8jwkhrbzcasp4dflv6hl24hcc4q2md5rn6i8f73dl18h";
+    };
+  }
+  {
+    goPackagePath  = "github.com/shurcooL/go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/shurcooL/go";
+      rev =  "9e1955d9fb6e1ee2345ba1f5e71669263e719e27";
+      sha256 = "1lad9bvs75jsn61cfza19739c2c057k0bqxg2b4xz3z3l4w1mkqj";
+    };
+  }
+  {
+    goPackagePath  = "github.com/shurcooL/graphql";
+    fetch = {
+      type = "git";
+      url = "https://github.com/shurcooL/graphql";
+      rev =  "365899397c9ad12805631fe4c9b2a64be9d74818";
+      sha256 = "10n4id76zpj5g4hr1ry8d9v5cvm039rygrpgdk4ygk198vhr0gwm";
+    };
+  }
+  {
+    goPackagePath  = "github.com/shurcooL/httpfs";
+    fetch = {
+      type = "git";
+      url = "https://github.com/shurcooL/httpfs";
+      rev =  "809beceb23714880abc4a382a00c05f89d13b1cc";
+      sha256 = "1hvj5q5kjw83z7f77y03fqfg7fps7pqj2cj2c38x752m0pq4j2w3";
+    };
+  }
+  {
+    goPackagePath  = "github.com/shurcooL/vfsgen";
+    fetch = {
+      type = "git";
+      url = "https://github.com/shurcooL/vfsgen";
+      rev =  "62bca832be04bd2bcaabd3b68a6b19a7ec044411";
+      sha256 = "1lh8sw7qxs43jj8k9pfn91kfy2033p3il9bcb63whz8zhqw2a16y";
+    };
+  }
+  {
+    goPackagePath  = "github.com/skratchdot/open-golang";
+    fetch = {
+      type = "git";
+      url = "https://github.com/skratchdot/open-golang";
+      rev =  "75fb7ed4208cf72d323d7d02fd1a5964a7a9073c";
+      sha256 = "1b67imqbsdvg19vif1q1dfmapxy3v2anagacbql95fwnnw0v8jga";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev =  "ef82de70bb3f60c65fb8eebacbb2d122ef517385";
+      sha256 = "1q1nsx05svyv9fv3fy6xv6gs9ffimkyzsfm49flvl3wnvf1ncrkd";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev =  "583c0c0531f06d5278b7d917446061adc344b5cd";
+      sha256 = "0nr4mdpfhhk94hq4ymn5b2sxc47b29p1akxd8b0hx4dvdybmipb5";
+    };
+  }
+  {
+    goPackagePath  = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev =  "f35b8ab0b5a2cef36673838d662e249dd9c94686";
+      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
+    };
+  }
+  {
+    goPackagePath  = "github.com/vektah/gqlgen";
+    fetch = {
+      type = "git";
+      url = "https://github.com/vektah/gqlgen";
+      rev =  "636435b68700211441303f1a5ed92f3768ba5774";
+      sha256 = "0d4sr6kpyn3zq3kpvk8lizy7hdpcw3fjmv7fbv2m1k9w8fzjawrz";
+    };
+  }
+  {
+    goPackagePath  = "github.com/vektah/gqlparser";
+    fetch = {
+      type = "git";
+      url = "https://github.com/vektah/gqlparser";
+      rev =  "14e83ae06ec152e6d0afb9766a00e0c0918aa8fc";
+      sha256 = "162j259402pa2wb4645z6gplx5g1a2sfk393k2svwgws3bg2bws2";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev =  "0e37d006457bf46f9e6692014ba72ef82c33022c";
+      sha256 = "1fj8rvrhgv5j8pmckzphvm3sqkzhcqp3idkxvgv13qrjdfycsa5r";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev =  "2f5d2388922f370f4355f327fcf4cfe9f5583908";
+      sha256 = "03s92ygxfrd2c1m4697sd6iksgbar6c007w1yf3h6wmd79vr5dxs";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/oauth2";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/oauth2";
+      rev =  "d2e6202438beef2727060aa7cabdd924d92ebfd9";
+      sha256 = "0wbn75fd10485nb93bm4kqldqifdim5xqy4v7r5sdvimvf3fyhn7";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev =  "ac767d655b305d4e9612f5f6e33120b9176c4ad4";
+      sha256 = "1ds29n5lh4j21hmzxz7vk7hv1k6sixc7f0zsdc9xqdg0j7d212zm";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/tools";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/tools";
+      rev =  "a434f64ace81347eff0fb4a32bc80a235e0ad762";
+      sha256 = "0zngnxrxjync4caz6ikmv5v0cn895iqhqmzqg9qddfm5bvl2a2my";
+    };
+  }
+  {
+    goPackagePath  = "google.golang.org/appengine";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/appengine";
+      rev =  "ae0ab99deb4dc413a2b4bd6c8bdd0eb67f1e4d06";
+      sha256 = "1iabxnqgxvvn1239i6fvfl375vlbvhfrc03m1x2rvalmx4d6w9c7";
+    };
+  }
+  {
+    goPackagePath  = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://github.com/go-yaml/yaml";
+      rev =  "5420a8b6744d3b0345ab293f6fcba19c978f1183";
+      sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1";
+    };
+  }
+  {
+    goPackagePath  = "gotest.tools";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gotestyourself/gotest.tools";
+      rev =  "b6e20af1ed078cd01a6413b734051a292450b4cb";
+      sha256 = "11k6hmfhaf0qxpddp3i5kfpacdx51q6pv4n1kn3jnf1hjs0yny2k";
+    };
+  }
+]
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix
new file mode 100644
index 000000000000..c14a027b4abe
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchgit
+, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, makeWrapper, xmlto
+, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  name = "git-bz-${version}";
+  version = "3.2015-09-08";
+
+  src = fetchgit {
+    sha256 = "146z57m8nblgsxm4z6qnsvcy81p11d0w88v93ybacc6w21plh8hc";
+    rev = "e17bbae7a2ce454d9f69c32fc40066995d44913d";
+    url = "git://git.fishsoup.net/git-bz";
+  };
+
+  nativeBuildInputs = [
+    asciidoc docbook_xml_dtd_45 docbook_xsl libxslt makeWrapper xmlto
+  ];
+  buildInputs = []
+    ++ (with pythonPackages; [ python pysqlite ]);
+
+  postPatch = ''
+    patchShebangs configure
+
+    # Don't create a .html copy of the man page that isn't installed anyway:
+    substituteInPlace Makefile --replace "git-bz.html" ""
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/git-bz \
+      --prefix PYTHONPATH : "$(toPythonPath "${pythonPackages.pycrypto}")" \
+      --prefix PYTHONPATH : "$(toPythonPath "${pythonPackages.pysqlite}")"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Bugzilla integration for git";
+    longDescription = ''
+      git-bz is a tool for integrating the Git command line with the
+      Bugzilla bug-tracking system. Operations such as attaching patches to
+      bugs, applying patches in bugs to your current tree, and closing bugs
+      once you've pushed the fixes publicly can be done completely from
+      the command line without having to go to your web browser.
+
+      Authentication for git-bz is done by reading the cookies for the
+      Bugzilla host from your web browser. In order to do this, git-bz needs
+      to know how to access the cookies for your web browser; git-bz
+      currently is able to do this for Firefox, Epiphany, Galeon and
+      Chromium on Linux.
+    '';
+    license = licenses.gpl2Plus;
+    homepage = http://git.fishsoup.net/cgit/git-bz/;
+
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
new file mode 100644
index 000000000000..206a4af91212
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
@@ -0,0 +1,21 @@
+{ lib, rustPlatform, fetchFromGitHub }:
+rustPlatform.buildRustPackage rec {
+  name = "git-codeowners-${version}";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "softprops";
+    repo = "git-codeowners";
+    rev = "v${version}";
+    sha256 = "0bzq4ridzb4l1zqrj1r0vlzkjpgfaqwky5jf49cwjhz4ybwrfpkq";
+  };
+
+  cargoSha256 = "0rdmv9s86xba1zkl2j5rgix6k7pkkxqmpar03sak2fjrd7mh8iz0";
+
+  meta = with lib; {
+    homepage = "https://github.com/softprops/git-codeowners";
+    description = "a git extension to work with CODEOWNERS files";
+    license = licenses.mit;
+    maintainers = with maintainers; [ zimbatm ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
new file mode 100644
index 000000000000..4b15d03d2007
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, pythonPackages, gettext, git }:
+
+let
+  inherit (pythonPackages) buildPythonApplication pyqt5 sip pyinotify;
+in buildPythonApplication rec {
+  name = "git-cola-${version}";
+  version = "3.2";
+
+  src = fetchFromGitHub {
+    owner = "git-cola";
+    repo = "git-cola";
+    rev = "v${version}";
+    sha256 = "1ivaqhvdbmlp0lmrwb2pv3kjqlcpqbxbinbvjjn3g81r4avjs7yy";
+  };
+
+  buildInputs = [ git gettext ];
+  propagatedBuildInputs = [ pyqt5 sip pyinotify ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/git-cola/git-cola;
+    description = "A sleek and powerful Git GUI";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bobvanderlinden ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix
new file mode 100644
index 000000000000..2163855d00e1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix
@@ -0,0 +1,47 @@
+{ fetchFromGitHub, git, gnupg1compat, makeWrapper, openssl, stdenv }:
+
+stdenv.mkDerivation rec {
+  name = "git-crypt-${version}";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "AGWA";
+    repo = "git-crypt";
+    rev = "${version}";
+    sha256 = "13m9y0m6gc3mlw3pqv9x4i0him2ycbysizigdvdanhh514kga602";
+    inherit name;
+  };
+
+  buildInputs = [ openssl makeWrapper ];
+
+  patchPhase = ''
+    substituteInPlace commands.cpp \
+      --replace '(escape_shell_arg(our_exe_path()))' '= "git-crypt"'
+  '';
+
+  installPhase = ''
+    make install PREFIX=$out
+    wrapProgram $out/bin/* --prefix PATH : $out/bin:${git}/bin:${gnupg1compat}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://www.agwa.name/projects/git-crypt;
+    description = "Transparent file encryption in git";
+    longDescription = ''
+      git-crypt enables transparent encryption and decryption of files in a git
+      repository. Files which you choose to protect are encrypted when
+      committed, and decrypted when checked out. git-crypt lets you freely
+      share a repository containing a mix of public and private
+      content. git-crypt gracefully degrades, so developers without the secret
+      key can still clone and commit to a repository with encrypted files. This
+      lets you store your secret material (such as keys or passwords) in the
+      same repository as your code, without requiring you to lock down your
+      entire repository.
+    '';
+    downloadPage = "https://github.com/AGWA/git-crypt/releases";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.dochang ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
new file mode 100644
index 000000000000..9c362276383c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, fetchFromGitHub
+, openssl
+, zlib
+, libssh
+, cmake
+, perl
+, pkgconfig
+, rustPlatform
+, curl
+, libiconv
+, CoreFoundation
+, Security
+}:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  name = "git-dit-${version}";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "neithernut";
+    repo = "git-dit";
+    rev = "v${version}";
+    sha256 = "1sx6sc2dj3l61gbiqz8vfyhw5w4xjdyfzn1ixz0y8ipm579yc7a2";
+  };
+
+  cargoSha256 = "08zbvjwjdpv2sbj6mh73py82inhs18jvmh8m9k4l94fcz6ykgqwr";
+
+  nativeBuildInputs = [
+    cmake
+    pkgconfig
+    perl
+  ];
+
+  buildInputs = [
+    openssl
+    libssh
+    zlib
+  ] ++ stdenv.lib.optionals (stdenv.isDarwin) [
+    curl
+    libiconv
+    CoreFoundation
+    Security
+  ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Decentralized Issue Tracking for git";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ Profpatsch ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix
new file mode 100644
index 000000000000..7b6dd8aacb44
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "git-extras-${version}";
+  version = "4.6.0";
+
+  src = fetchurl {
+    url = "https://github.com/tj/git-extras/archive/${version}.tar.gz";
+    sha256 = "1jp5wi2h4jqbrjv0iqa45s0f9h3n5k1dxs89jkhg5n5k9jjs7fp3";
+  };
+
+  dontBuild = true;
+
+  installFlags = [ "DESTDIR=$(out) PREFIX=" ];
+
+  postInstall = ''
+    install -D etc/git-extras-completion.zsh $out/share/zsh/site-functions/_git_extras
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/tj/git-extras;
+    description = "GIT utilities -- repo summary, repl, changelog population, author commit percentages and more";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.spwhitt maintainers.cko ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile
new file mode 100644
index 000000000000..17373f02b44d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in git_fame.gemspec
+gem "git_fame"
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock
new file mode 100644
index 000000000000..0ac7907fe55d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock
@@ -0,0 +1,26 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    git_fame (2.5.2)
+      hirb (~> 0.7.3)
+      memoist (~> 0.14.0)
+      method_profiler (~> 2.0.1)
+      progressbar (~> 0.21.0)
+      scrub_rb (~> 1.0.1)
+      trollop (~> 2.1.2)
+    hirb (0.7.3)
+    memoist (0.14.0)
+    method_profiler (2.0.1)
+      hirb (>= 0.6.0)
+    progressbar (0.21.0)
+    scrub_rb (1.0.1)
+    trollop (2.1.2)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  git_fame
+
+BUNDLED WITH
+   1.14.6
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix
new file mode 100644
index 000000000000..9ca7a67a53e7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, bundlerEnv, ruby }:
+
+bundlerEnv rec {
+  inherit ruby;
+
+  pname = "git_fame";
+
+  gemdir = ./.;
+
+  meta = with stdenv.lib; {
+    description = ''
+      A command-line tool that helps you summarize and pretty-print collaborators based on contributions
+      '';
+    homepage    = http://oleander.io/git-fame-rb;
+    license     = licenses.mit;
+    maintainers = with maintainers; [ expipiplus1 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix
new file mode 100644
index 000000000000..49b4af4ef6d3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix
@@ -0,0 +1,60 @@
+{
+  git_fame = {
+    dependencies = ["hirb" "memoist" "method_profiler" "progressbar" "scrub_rb" "trollop"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "02k5ls5zyif8skdbnym6zw9y76whlnksw2m94jsh2n1ygk98izdd";
+      type = "gem";
+    };
+    version = "2.5.2";
+  };
+  hirb = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0mzch3c2lvmf8gskgzlx6j53d10j42ir6ik2dkrl27sblhy76cji";
+      type = "gem";
+    };
+    version = "0.7.3";
+  };
+  memoist = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "03d3h6kp16bf0crqg1cxdgp1d2iyzn53d3phbmjh4pjybqls0gcm";
+      type = "gem";
+    };
+    version = "0.14.0";
+  };
+  method_profiler = {
+    dependencies = ["hirb"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1ax04qrrv7fqp5ayxaxhn72660pybdkpkvmgiwbg7bs7x5ijjzd8";
+      type = "gem";
+    };
+    version = "2.0.1";
+  };
+  progressbar = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "17haw9c6c9q6imsn83pii32jnihpg76jgd09x7y4hjqq45n3qcdh";
+      type = "gem";
+    };
+    version = "0.21.0";
+  };
+  scrub_rb = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0dwg33w83w17aiij9kcbi7irj7lh045nh9prjgkzjya3f1j60d3x";
+      type = "gem";
+    };
+    version = "1.0.1";
+  };
+  trollop = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0415y63df86sqj43c0l82and65ia5h64if7n0znkbrmi6y0jwhl8";
+      type = "gem";
+    };
+    version = "2.1.2";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix
new file mode 100644
index 000000000000..ba126bb476c1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, gitMinimal, python2Packages }:
+
+stdenv.mkDerivation rec {
+  name = "git-hub-${version}";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    sha256 = "1lizjyi8vac1p1anbnh6qrr176rwxp5yjc1787asw437sackkwza";
+    rev = "v${version}";
+    repo = "git-hub";
+    owner = "sociomantic-tsunami";
+  };
+
+  buildInputs = [ python2Packages.python ];
+  nativeBuildInputs = [
+    gitMinimal        # Used during build to generate Bash completion.
+    python2Packages.docutils
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  enableParallelBuilding = true;
+
+  installFlags = [ "prefix=$(out)" "sysconfdir=$(out)/etc" ];
+
+  postInstall = ''
+    # Remove inert ftdetect vim plugin and a README that's a man page subset:
+    rm -r $out/share/{doc,vim}
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Git command line interface to GitHub";
+    longDescription = ''
+      A simple command line interface to GitHub, enabling most useful GitHub
+      tasks (like creating and listing pull request or issues) to be accessed
+      directly through the Git command line.
+    '';
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix
new file mode 100644
index 000000000000..10e786222710
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  name = "git-imerge-${version}";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "mhagger";
+    repo = "git-imerge";
+    rev = "v${version}";
+    sha256 = "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4";
+  };
+
+  buildInputs = [ pythonPackages.python pythonPackages.wrapPython ];
+
+  makeFlags = "PREFIX= DESTDIR=$(out)" ; 
+ 
+  meta = with stdenv.lib; {
+    homepage = https://github.com/mhagger/git-imerge;
+    description = "Perform a merge between two branches incrementally";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix
new file mode 100644
index 000000000000..f8d871bdcf30
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, git, perl, makeWrapper }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "git-octopus-${version}";
+  version = "1.4";
+
+  installFlags = [ "prefix=$(out)" ];
+
+  buildInputs = [ makeWrapper ];
+
+  # perl provides shasum
+  postInstall = ''
+    for f in $out/bin/*; do
+      wrapProgram $f --prefix PATH : ${makeBinPath [ git perl ]}
+    done
+  '';
+
+  src = fetchFromGitHub {
+    owner = "lesfurets";
+    repo = "git-octopus";
+    rev = "v${version}";
+    sha256 = "14p61xk7jankp6gc26xciag9fnvm7r9vcbhclcy23f4ghf4q4sj1";
+  };
+
+  meta = {
+    homepage = https://github.com/lesfurets/git-octopus;
+    description = "The continuous merge workflow";
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = [maintainers.mic92];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix
new file mode 100644
index 000000000000..dc3fbbed1995
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix
@@ -0,0 +1,32 @@
+{stdenv, git, xdg_utils, gnugrep, fetchFromGitHub, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  name = "git-open-${version}";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "paulirish";
+    repo = "git-open";
+    rev = "v${version}";
+    sha256 = "0lprzrjsqrg83gixfaiw26achgd8l7s56jknsjss4p7y0w1fxm05";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-open $out/bin
+    wrapProgram $out/bin/git-open \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git xdg_utils gnugrep ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/paulirish/git-open;
+    description = "Open the GitHub page or website for a repository in your browser";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.jlesquembre ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix
new file mode 100644
index 000000000000..d72df8028759
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchFromGitHub}:
+
+stdenv.mkDerivation rec {
+  name = "git-radar-${version}";
+  version = "0.6";
+
+  src = fetchFromGitHub {
+    owner = "michaeldfallen";
+    repo = "git-radar";
+    rev = "v${version}";
+    sha256 = "0c3zp8s4w7m4s71qgwk1jyfc8yzw34f2hi43x1w437ypgabwg81j";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out
+    ln -s $out/git-radar $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/michaeldfallen/git-radar;
+    license = licenses.mit;
+    description = "A tool you can add to your prompt to provide at-a-glance information on your git repo";
+    platforms = with platforms; linux ++ darwin;
+    maintainers = with maintainers; [ kamilchm ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix
new file mode 100644
index 000000000000..c52a78ff0076
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix
@@ -0,0 +1,35 @@
+{stdenv, git, less, fetchFromGitHub, makeWrapper
+# utillinuxMinimal is included because we need the column command
+, utillinux
+}:
+
+stdenv.mkDerivation rec {
+  name = "git-recent-${version}";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "paulirish";
+    repo = "git-recent";
+    rev = "v${version}";
+    sha256 = "06r1jzmzdv3d4vxdh5qyf5g5rgavxfmh2rpbs7a7byg3k7d77hpn";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-recent $out/bin
+    wrapProgram $out/bin/git-recent \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git less utillinux ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/paulirish/git-recent;
+    description = "See your latest local git branches, formatted real fancy";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.jlesquembre ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix
new file mode 100644
index 000000000000..adfdb9a541c1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, docutils, makeWrapper, gnupg1compat, curl, rsync }:
+
+stdenv.mkDerivation rec {
+  name = "git-remote-gcrypt-${version}";
+  version = "1.1";
+  rev = version;
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "spwhitton";
+    repo = "git-remote-gcrypt";
+    sha256 = "0mhz5mqnr35rk7j4wyhp7hzmqgv8r554n9qlm4iw565bz7acvq24";
+  };
+
+  outputs = [ "out" "man" ];
+
+  nativeBuildInputs = [ docutils makeWrapper ];
+
+  installPhase = ''
+    prefix="$out" ./install.sh
+    wrapProgram "$out/bin/git-remote-gcrypt" \
+      --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1compat curl rsync ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://spwhitton.name/tech/code/git-remote-gcrypt;
+    description = "A git remote helper for GPG-encrypted remotes";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ellis montag451 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix
new file mode 100644
index 000000000000..f30813cf1201
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchgit, mercurial, makeWrapper,
+  asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt, libxml2
+}:
+
+stdenv.mkDerivation rec {
+  rev = "e716a9e1a9e460a45663694ba4e9e8894a8452b2";
+  version = "0.2-${rev}";
+  name = "git-remote-hg-${version}";
+
+  src = fetchgit {
+    inherit rev;
+    url = "git://github.com/fingolfin/git-remote-hg.git";
+    sha256 = "0cmlfdxfabrs3x10mfjfap8wz67s8xk2pjn2wlcj9k2v84gji60m";
+  };
+
+  buildInputs = [ mercurial.python mercurial makeWrapper
+    asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt libxml2
+  ];
+
+  doCheck = false;
+
+  installFlags = "HOME=\${out} install-doc";
+
+  postInstall = ''
+    wrapProgram $out/bin/git-remote-hg \
+      --prefix PYTHONPATH : "$(echo ${mercurial}/lib/python*/site-packages):$(echo ${mercurial.python}/lib/python*/site-packages)${stdenv.lib.concatMapStrings (x: ":$(echo ${x}/lib/python*/site-packages)") mercurial.pythonPackages or []}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/felipec/git-remote-hg;
+    description = "Semi-official Mercurial bridge from Git project, once installed, it allows you to clone, fetch and push to and from Mercurial repositories as if they were Git ones";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.garbas ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix
new file mode 100644
index 000000000000..03435ec834ab
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git, gnused }:
+
+stdenv.mkDerivation rec {
+  name = "git-reparent-${version}";
+  version = "unstable-2017-09-03";
+
+  src = fetchFromGitHub {
+    owner  = "MarkLodato";
+    repo   = "git-reparent";
+    rev    = "a99554a32524a86421659d0f61af2a6c784b7715";
+    sha256 = "0v0yxydpw6r4awy0hb7sbnh520zsk86ibzh1xjf3983yhsvkfk5v";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -m755 -Dt $out/bin git-reparent
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/git-reparent --prefix PATH : "${stdenv.lib.makeBinPath [ git gnused ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Git command to recommit HEAD with a new set of parents";
+    maintainers = [ maintainers.marsam ];
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix
new file mode 100644
index 000000000000..5c6c22ac9ccd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, git, gnupg, gawk }:
+
+let
+  version = "0.2.4";
+  repo = "git-secret";
+
+in stdenv.mkDerivation {
+  name = "${repo}-${version}";
+
+  src = fetchFromGitHub {
+    inherit repo;
+    owner = "sobolevn";
+    rev = "v${version}";
+    sha256 = "0lx2rjyhy3xh6ik755lbbl40v7a7ayyqk68jj8mnv42f2vhd66xl";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -D git-secret $out/bin/git-secret
+
+    wrapProgram $out/bin/git-secret \
+      --prefix PATH : "${lib.makeBinPath [ git gnupg gawk ]}"
+
+    mkdir $out/share
+    cp -r man $out/share
+  '';
+
+  meta = {
+    description = "A bash-tool to store your private data inside a git repository";
+    homepage = http://git-secret.io;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.lo1tuma ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
new file mode 100644
index 000000000000..fb85bb7da463
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
+
+stdenv.mkDerivation rec {
+  name = "git-secrets-${version}";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "git-secrets";
+    rev = "${version}";
+    sha256 = "14jsm4ks3k5d9iq3jr23829izw040pqpmv7dz8fhmvx6qz8fybzg";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -m755 -Dt $out/bin git-secrets
+    install -m444 -Dt $out/share/man/man1 git-secrets.1
+
+    wrapProgram $out/bin/git-secrets \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git coreutils ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Prevents you from committing secrets and credentials into git repositories";
+    homepage = https://github.com/awslabs/git-secrets;
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix
new file mode 100644
index 000000000000..6a52983e83ce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchFromGitHub, ... }:
+
+stdenv.mkDerivation rec {
+  name = "git-stree-${version}";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "tdd";
+    repo = "git-stree";
+    rev = "0.4.5";
+    sha256 = "0y5h44n38w6rhy9m591dvibxpfggj3q950ll7y4h49bhpks4m0l9";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin $out/etc/bash_completion.d
+    install -m 0755 git-stree $out/bin/
+    install -m 0644 git-stree-completion.bash $out/etc/bash_completion.d/
+  '';
+
+  meta = with lib; {
+    description = "A better Git subtree helper command";
+    homepage = http://deliciousinsights.github.io/git-stree;
+    license = licenses.mit;
+    maintainers = [ maintainers.benley ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix
new file mode 100644
index 000000000000..7ba7d8ec2434
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchFromGitHub, coreutils, gnugrep, gnused, makeWrapper, git
+}:
+
+stdenv.mkDerivation rec {
+  name = "git-sync-${version}";
+  version = "20151024";
+
+  src = fetchFromGitHub {
+    owner = "simonthum";
+    repo = "git-sync";
+    rev = "eb9adaf2b5fd65aac1e83d6544b9076aae6af5b7";
+    sha256 = "01if8y93wa0mwbkzkzx2v1vqh47zlz4k1dysl6yh5rmppd1psknz";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -a git-sync $out/bin/git-sync
+  '';
+
+  wrapperPath = with stdenv.lib; makeBinPath [
+    coreutils
+    git
+    gnugrep
+    gnused
+  ];
+
+  fixupPhase = ''
+    patchShebangs $out/bin
+
+    wrapProgram $out/bin/git-sync \
+      --prefix PATH : "${wrapperPath}"
+  '';
+
+  meta = {
+    description = "A script to automatically synchronize a git repository";
+    homepage = https://github.com/simonthum/git-sync;
+    maintainers = with stdenv.lib.maintainers; [ imalison ];
+    license = stdenv.lib.licenses.cc0;
+    platforms = with stdenv.lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix
new file mode 100644
index 000000000000..1150f008299c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git }:
+
+stdenv.mkDerivation rec {
+  name = "git-test-${version}";
+  version = "1.0.4";
+
+  src = fetchFromGitHub {
+    owner = "spotify";
+    repo = "git-test";
+    rev = "v${version}";
+    sha256 = "01h3f0andv1p7pwir3k6n01v92hgr5zbjadfwl144yjw9x37fm2f";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -m755 -Dt $out/bin git-test
+    install -m444 -Dt $out/share/man/man1 git-test.1
+
+    wrapProgram $out/bin/git-test \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Test your commits";
+    homepage = https://github.com/spotify/git-test;
+    license = licenses.asl20;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix
new file mode 100644
index 000000000000..88704ef281eb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -0,0 +1,322 @@
+{ fetchurl, stdenv, buildPackages
+, curl, openssl, zlib, expat, perl, python, gettext, cpio
+, gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc
+, openssh, pcre2
+, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
+, libxslt, tcl, tk, makeWrapper, libiconv
+, svnSupport, subversionClient, perlLibs, smtpPerlLibs
+, perlSupport ? true
+, guiSupport
+, withManual ? true
+, pythonSupport ? true
+, withpcre2 ? true
+, sendEmailSupport
+, darwin
+, withLibsecret ? false
+, pkgconfig, glib, libsecret
+}:
+
+assert sendEmailSupport -> perlSupport;
+assert svnSupport -> perlSupport;
+
+let
+  version = "2.19.2";
+  svn = subversionClient.override { perlBindings = perlSupport; };
+in
+
+stdenv.mkDerivation {
+  name = "git-${version}";
+
+  src = fetchurl {
+    url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
+    sha256 = "1scbggzghkzzfqg4ky3qh7h9w87c3zya4ls5disz7dbx56is7sgw";
+  };
+
+  outputs = [ "out" ] ++ stdenv.lib.optional perlSupport "gitweb";
+
+  hardeningDisable = [ "format" ];
+
+  enableParallelBuilding = true;
+
+  ## Patch
+
+  patches = [
+    ./docbook2texi.patch
+    ./git-sh-i18n.patch
+    ./ssh-path.patch
+    ./git-send-email-honor-PATH.patch
+    ./installCheck-path.patch
+  ];
+
+  postPatch = ''
+    for x in connect.c git-gui/lib/remote_add.tcl ; do
+      substituteInPlace "$x" \
+        --subst-var-by ssh "${openssh}/bin/ssh"
+    done
+
+    # Fix references to gettext introduced by ./git-sh-i18n.patch
+    substituteInPlace git-sh-i18n.sh \
+        --subst-var-by gettext ${gettext}
+  '';
+
+  nativeBuildInputs = [ gettext perl ]
+    ++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
+         docbook_xsl docbook_xml_dtd_45 libxslt ];
+  buildInputs = [curl openssl zlib expat cpio makeWrapper libiconv]
+    ++ stdenv.lib.optionals perlSupport [ perl ]
+    ++ stdenv.lib.optionals guiSupport [tcl tk]
+    ++ stdenv.lib.optionals withpcre2 [ pcre2 ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ]
+    ++ stdenv.lib.optionals withLibsecret [ pkgconfig glib libsecret ];
+
+  # required to support pthread_cancel()
+  NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s"
+              + stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr";
+
+  configureFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "ac_cv_fread_reads_directories=yes"
+    "ac_cv_snprintf_returns_bogus=no"
+  ];
+
+  preBuild = ''
+    makeFlagsArray+=( perllibdir=$out/$(perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}') )
+  '';
+
+  makeFlags = [
+    "prefix=\${out}"
+    "SHELL_PATH=${stdenv.shell}"
+  ]
+  ++ (if perlSupport then ["PERL_PATH=${perl}/bin/perl"] else ["NO_PERL=1"])
+  ++ (if pythonSupport then ["PYTHON_PATH=${python}/bin/python"] else ["NO_PYTHON=1"])
+  ++ stdenv.lib.optionals stdenv.isSunOS ["INSTALL=install" "NO_INET_NTOP=" "NO_INET_PTON="]
+  ++ (if stdenv.isDarwin then ["NO_APPLE_COMMON_CRYPTO=1"] else ["sysconfdir=/etc/"])
+  ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl ["NO_SYS_POLL_H=1" "NO_GETTEXT=YesPlease"]
+  ++ stdenv.lib.optional withpcre2 "USE_LIBPCRE2=1";
+
+
+  postBuild = ''
+    make -C contrib/subtree
+  '' + (stdenv.lib.optionalString stdenv.isDarwin ''
+    make -C contrib/credential/osxkeychain
+  '') + (stdenv.lib.optionalString withLibsecret ''
+    make -C contrib/credential/libsecret
+  '');
+
+
+  ## Install
+
+  # WARNING: Do not `rm` or `mv` files from the source tree; use `cp` instead.
+  #          We need many of these files during the installCheckPhase.
+
+  installFlags = "NO_INSTALL_HARDLINKS=1";
+
+  preInstall = (stdenv.lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/bin
+    ln -s $out/share/git/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin/
+    rm -f $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain.o
+  '') + (stdenv.lib.optionalString withLibsecret ''
+    mkdir -p $out/bin
+    ln -s $out/share/git/contrib/credential/libsecret/git-credential-libsecret $out/bin/
+    rm -f $PWD/contrib/credential/libsecret/git-credential-libsecret.o
+  '');
+
+  postInstall =
+    ''
+      notSupported() {
+        unlink $1 || true
+      }
+
+      # Install git-subtree.
+      make -C contrib/subtree install ${stdenv.lib.optionalString withManual "install-doc"}
+      rm -rf contrib/subtree
+
+      # Install contrib stuff.
+      mkdir -p $out/share/git
+      cp -a contrib $out/share/git/
+      ln -s "$out/share/git/contrib/credential/netrc/git-credential-netrc" $out/bin/
+      mkdir -p $out/share/emacs/site-lisp
+      ln -s "$out/share/git/contrib/emacs/"*.el $out/share/emacs/site-lisp/
+      mkdir -p $out/etc/bash_completion.d
+      ln -s $out/share/git/contrib/completion/git-completion.bash $out/etc/bash_completion.d/
+      ln -s $out/share/git/contrib/completion/git-prompt.sh $out/etc/bash_completion.d/
+
+      # grep is a runtime dependency, need to patch so that it's found
+      substituteInPlace $out/libexec/git-core/git-sh-setup \
+          --replace ' grep' ' ${gnugrep}/bin/grep' \
+          --replace ' egrep' ' ${gnugrep}/bin/egrep'
+
+      # Fix references to the perl, sed, awk and various coreutil binaries used by
+      # shell scripts that git calls (e.g. filter-branch)
+      SCRIPT="$(cat <<'EOS'
+        BEGIN{
+          @a=(
+            '${gnugrep}/bin/grep', '${gnused}/bin/sed', '${gawk}/bin/awk',
+            '${coreutils}/bin/cut', '${coreutils}/bin/basename', '${coreutils}/bin/dirname',
+            '${coreutils}/bin/wc', '${coreutils}/bin/tr'
+            ${stdenv.lib.optionalString perlSupport ", '${perl}/bin/perl'"}
+          );
+        }
+        foreach $c (@a) {
+          $n=(split("/", $c))[-1];
+          s|(?<=[^#][^/.-])\b''${n}(?=\s)|''${c}|g
+        }
+      EOS
+      )"
+      perl -0777 -i -pe "$SCRIPT" \
+        $out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,stash,submodule,subtree,web--browse}
+
+
+      # Also put git-http-backend into $PATH, so that we can use smart
+      # HTTP(s) transports for pushing
+      ln -s $out/libexec/git-core/git-http-backend $out/bin/git-http-backend
+    '' + stdenv.lib.optionalString perlSupport ''
+      # put in separate package for simpler maintenance
+      mv $out/share/gitweb $gitweb/
+
+      # wrap perl commands
+      gitperllib=$out/lib/perl5/site_perl
+      for i in ${builtins.toString perlLibs}; do
+        gitperllib=$gitperllib:$i/lib/perl5/site_perl
+      done
+      wrapProgram $out/libexec/git-core/git-cvsimport \
+                  --set GITPERLLIB "$gitperllib"
+      wrapProgram $out/libexec/git-core/git-add--interactive \
+                  --set GITPERLLIB "$gitperllib"
+      wrapProgram $out/libexec/git-core/git-archimport \
+                  --set GITPERLLIB "$gitperllib"
+      wrapProgram $out/libexec/git-core/git-instaweb \
+                  --set GITPERLLIB "$gitperllib"
+      wrapProgram $out/libexec/git-core/git-cvsexportcommit \
+                  --set GITPERLLIB "$gitperllib"
+    ''
+
+   + (if svnSupport then
+
+      ''# wrap git-svn
+        gitperllib=$out/lib/perl5/site_perl
+        for i in ${builtins.toString perlLibs} ${svn.out}; do
+          gitperllib=$gitperllib:$i/lib/perl5/site_perl
+        done
+        wrapProgram $out/libexec/git-core/git-svn     \
+                     --set GITPERLLIB "$gitperllib"   \
+                     --prefix PATH : "${svn.out}/bin" ''
+       else '' # replace git-svn by notification script
+        notSupported $out/libexec/git-core/git-svn
+       '')
+
+   + (if sendEmailSupport then
+      ''# wrap git-send-email
+        gitperllib=$out/lib/perl5/site_perl
+        for i in ${builtins.toString smtpPerlLibs}; do
+          gitperllib=$gitperllib:$i/lib/perl5/site_perl
+        done
+        wrapProgram $out/libexec/git-core/git-send-email \
+                     --set GITPERLLIB "$gitperllib" ''
+       else '' # replace git-send-email by notification script
+        notSupported $out/libexec/git-core/git-send-email
+       '')
+
+   + stdenv.lib.optionalString withManual ''# Install man pages and Info manual
+       make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-info \
+         -C Documentation ''
+
+   + (if guiSupport then ''
+       # Wrap Tcl/Tk programs
+       for prog in bin/gitk libexec/git-core/{git-gui,git-citool,git-gui--askpass}; do
+         sed -i -e "s|exec 'wish'|exec '${tk}/bin/wish'|g" \
+                -e "s|exec wish|exec '${tk}/bin/wish'|g" \
+                "$out/$prog"
+       done
+     '' else ''
+       # Don't wrap Tcl/Tk, replace them by notification scripts
+       for prog in bin/gitk libexec/git-core/git-gui; do
+         notSupported "$out/$prog"
+       done
+     '')
+   + stdenv.lib.optionalString stdenv.isDarwin ''
+    # enable git-credential-osxkeychain by default if darwin
+    cat > $out/etc/gitconfig << EOF
+[credential]
+	helper = osxkeychain
+EOF
+  '';
+
+
+  ## InstallCheck
+
+  doCheck = false;
+  doInstallCheck = true;
+
+  installCheckTarget = "test";
+
+  # see also installCheckFlagsArray
+  installCheckFlags = "DEFAULT_TEST_TARGET=prove";
+
+  preInstallCheck = ''
+    installCheckFlagsArray+=(
+      GIT_PROVE_OPTS="--jobs $NIX_BUILD_CORES --failures --state=failed,save"
+      GIT_TEST_INSTALLED=$out/bin
+      ${stdenv.lib.optionalString (!svnSupport) "NO_SVN_TESTS=y"}
+    )
+
+    function disable_test {
+      local test=$1 pattern=$2
+      if [ $# -eq 1 ]; then
+        mv t/{,skip-}$test.sh || true
+      else
+        sed -i t/$test.sh \
+          -e "/^ *test_expect_.*$pattern/,/^ *' *\$/{s/^/#/}"
+      fi
+    }
+
+    # Shared permissions are forbidden in sandbox builds.
+    disable_test t0001-init shared
+    disable_test t1301-shared-repo
+
+    # Our patched gettext never fallbacks
+    disable_test t0201-gettext-fallbacks
+
+    ${stdenv.lib.optionalString (!sendEmailSupport) ''
+      # Disable sendmail tests
+      disable_test t9001-send-email
+    ''}
+
+    # XXX: I failed to understand why this one fails.
+    # Could someone try to re-enable it on the next release ?
+    # Tested to fail: 2.18.0 and 2.19.0
+    disable_test t1700-split-index "null sha1"
+
+    # Tested to fail: 2.18.0
+    disable_test t7005-editor "editor with a space"
+    disable_test t7005-editor "core.editor with a space"
+
+    # Tested to fail: 2.18.0
+    disable_test t9902-completion "sourcing the completion script clears cached --options"
+
+    # As of 2.19.0, t5562 refers to #!/usr/bin/perl
+    patchShebangs t/t5562/invoke-with-content-length.pl
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    # Test fails (as of 2.17.0, musl 1.1.19)
+    disable_test t3900-i18n-commit
+    # Fails largely due to assumptions about BOM
+    # Tested to fail: 2.18.0
+    disable_test t0028-working-tree-encoding
+  '';
+
+  stripDebugList = [ "lib" "libexec" "bin" "share/git/contrib/credential/libsecret" ];
+
+
+  meta = {
+    homepage = https://git-scm.com/;
+    description = "Distributed version control system";
+    license = stdenv.lib.licenses.gpl2;
+
+    longDescription = ''
+      Git, a popular distributed version control system designed to
+      handle very large projects with speed and efficiency.
+    '';
+
+    platforms = stdenv.lib.platforms.all;
+    maintainers = with stdenv.lib.maintainers; [ peti the-kenny wmertens ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch
new file mode 100644
index 000000000000..ab5bb3c3a6c7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch
@@ -0,0 +1,37 @@
+This patch does two things: (1) use the right name for `docbook2texi',
+and (2) make sure `gitman.info' isn't produced since it's broken (duplicate
+node names).
+
+diff --git a/Documentation/Makefile b/Documentation/Makefile
+--- a/Documentation/Makefile
++++ b/Documentation/Makefile
+@@ -122,7 +122,7 @@
+ 
+ MAKEINFO = makeinfo
+ INSTALL_INFO = install-info
+-DOCBOOK2X_TEXI = docbook2x-texi
++DOCBOOK2X_TEXI = docbook2texi
+ DBLATEX = dblatex
+ ASCIIDOC_DBLATEX_DIR = /etc/asciidoc/dblatex
+ DBLATEX_COMMON = -p $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.sty
+@@ -240,7 +240,7 @@
+ man5: $(DOC_MAN5)
+ man7: $(DOC_MAN7)
+ 
+-info: git.info gitman.info
++info: git.info
+ 
+ pdf: user-manual.pdf
+ 
+@@ -256,10 +256,9 @@
+ 
+ install-info: info
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)
+-	$(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir)
++	$(INSTALL) -m 644 git.info $(DESTDIR)$(infodir)
+ 	if test -r $(DESTDIR)$(infodir)/dir; then \
+ 	  $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\
+-	  $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) gitman.info ;\
+ 	else \
+ 	  echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
+ 	fi
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch
new file mode 100644
index 000000000000..6b93d061a3be
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch
@@ -0,0 +1,26 @@
+diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
+--- a/Documentation/git-send-email.txt
++++ b/Documentation/git-send-email.txt
+@@ -208,8 +208,7 @@ a password is obtained using 'git-credential'.
+ 	specify a full pathname of a sendmail-like program instead;
+ 	the program must support the `-i` option.  Default value can
+ 	be specified by the `sendemail.smtpServer` configuration
+-	option; the built-in default is to search for `sendmail` in
+-	`/usr/sbin`, `/usr/lib` and $PATH if such program is
++	option; the built-in default is to search in $PATH if such program is
+ 	available, falling back to `localhost` otherwise.
+
+ --smtp-server-port=<port>::
+diff --git a/git-send-email.perl b/git-send-email.perl
+--- a/git-send-email.perl
++++ b/git-send-email.perl
+@@ -944,8 +944,7 @@ if (defined $reply_to) {
+ }
+
+ if (!defined $smtp_server) {
+-	my @sendmail_paths = qw( /usr/sbin/sendmail /usr/lib/sendmail );
+-	push @sendmail_paths, map {"$_/sendmail"} split /:/, $ENV{PATH};
++	my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH};
+ 	foreach (@sendmail_paths) {
+ 		if (-x $_) {
+ 			$smtp_server = $_;
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch
new file mode 100644
index 000000000000..216c0e56b44c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch
@@ -0,0 +1,94 @@
+--- a/git-sh-i18n.sh
++++ b/git-sh-i18n.sh
+@@ -15,87 +15,11 @@
+ fi
+ export TEXTDOMAINDIR
+
+-# First decide what scheme to use...
+-GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+-if test -n "$GIT_GETTEXT_POISON"
+-then
+-	GIT_INTERNAL_GETTEXT_SH_SCHEME=poison
+-elif test -n "@@USE_GETTEXT_SCHEME@@"
+-then
+-	GIT_INTERNAL_GETTEXT_SH_SCHEME="@@USE_GETTEXT_SCHEME@@"
+-elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
+-then
+-	: no probing necessary
+-elif type gettext.sh >/dev/null 2>&1
+-then
+-	# GNU libintl's gettext.sh
+-	GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+-elif test "$(gettext -h 2>&1)" = "-h"
+-then
+-	# gettext binary exists but no gettext.sh. likely to be a gettext
+-	# binary on a Solaris or something that is not GNU libintl and
+-	# lack eval_gettext.
+-	GIT_INTERNAL_GETTEXT_SH_SCHEME=gettext_without_eval_gettext
+-fi
+-export GIT_INTERNAL_GETTEXT_SH_SCHEME
+-
+-# ... and then follow that decision.
+-case "$GIT_INTERNAL_GETTEXT_SH_SCHEME" in
+-gnu)
+-	# Use libintl's gettext.sh, or fall back to English if we can't.
+-	. gettext.sh
+-	;;
+-gettext_without_eval_gettext)
+-	# Solaris has a gettext(1) but no eval_gettext(1)
+-	eval_gettext () {
+-		gettext "$1" | (
+-			export PATH $(git sh-i18n--envsubst --variables "$1");
+-			git sh-i18n--envsubst "$1"
+-		)
+-	}
+-
+-	eval_ngettext () {
+-		ngettext "$1" "$2" "$3" | (
+-			export PATH $(git sh-i18n--envsubst --variables "$2");
+-			git sh-i18n--envsubst "$2"
+-		)
+-	}
+-	;;
+-poison)
+-	# Emit garbage so that tests that incorrectly rely on translatable
+-	# strings will fail.
+-	gettext () {
+-		printf "%s" "# GETTEXT POISON #"
+-	}
+-
+-	eval_gettext () {
+-		printf "%s" "# GETTEXT POISON #"
+-	}
+-
+-	eval_ngettext () {
+-		printf "%s" "# GETTEXT POISON #"
+-	}
+-	;;
+-*)
+-	gettext () {
+-		printf "%s" "$1"
+-	}
+-
+-	eval_gettext () {
+-		printf "%s" "$1" | (
+-			export PATH $(git sh-i18n--envsubst --variables "$1");
+-			git sh-i18n--envsubst "$1"
+-		)
+-	}
++# GNU gettext
++export GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
++export PATH=@gettext@/bin:$PATH
+
+-	eval_ngettext () {
+-		(test "$3" = 1 && printf "%s" "$1" || printf "%s" "$2") | (
+-			export PATH $(git sh-i18n--envsubst --variables "$2");
+-			git sh-i18n--envsubst "$2"
+-		)
+-	}
+-	;;
+-esac
++. @gettext@/bin/gettext.sh
+
+ # Git-specific wrapper functions
+ gettextln () {
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch
new file mode 100644
index 000000000000..8c68fb9f186b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch
@@ -0,0 +1,12 @@
+diff --git a/t/test-lib.sh b/t/test-lib.sh
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -923,7 +923,7 @@
+ then
+ 	GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path)  ||
+ 	error "Cannot run git from $GIT_TEST_INSTALLED."
+-	PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR:$PATH
++	PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$GIT_BUILD_DIR:$PATH
+ 	GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH}
+ else # normal case, use ../bin-wrappers only unless $with_dashes:
+ 	git_bin_dir="$GIT_BUILD_DIR/bin-wrappers"
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch
new file mode 100644
index 000000000000..addb1dbc5e06
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch
@@ -0,0 +1,26 @@
+diff --git a/connect.c b/connect.c
+index c3a014c5b..fbca3262b 100644
+--- a/connect.c
++++ b/connect.c
+@@ -1010,7 +1010,7 @@ static void fill_ssh_args(struct child_process *conn, const char *ssh_host,
+
+ 		ssh = getenv("GIT_SSH");
+ 		if (!ssh)
+-			ssh = "ssh";
++			ssh = "@ssh@";
+ 		variant = determine_ssh_variant(ssh, 0);
+ 	}
+
+diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl
+index 480a6b30d..781720424 100644
+--- a/git-gui/lib/remote_add.tcl
++++ b/git-gui/lib/remote_add.tcl
+@@ -139,7 +139,7 @@ method _add {} {
+ 		# Parse the location
+ 		if { [regexp {(?:git\+)?ssh://([^/]+)(/.+)} $location xx host path]
+ 		     || [regexp {([^:][^:]+):(.+)} $location xx host path]} {
+-			set ssh ssh
++			set ssh @ssh@
+ 			if {[info exists env(GIT_SSH)]} {
+ 				set ssh $env(GIT_SSH)
+ 			}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix
new file mode 100644
index 000000000000..044800fe73a6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix
@@ -0,0 +1,23 @@
+{ fetchgit, stdenv, perl }:
+
+stdenv.mkDerivation {
+  name = "git2cl-20080827";
+
+  src = fetchgit {
+    url = "git://repo.or.cz/git2cl.git";
+    rev = "8373c9f74993e218a08819cbcdbab3f3564bbeba";
+    sha256 = "b0d39379640c8a12821442431e2121f7908ce1cc88ec8ec6bede218ea8c21f2f";
+  };
+
+  buildInputs = [ perl ];
+  installPhase = ''
+    install -D -m755 git2cl $out/bin/git2cl
+    install -D -m644 README $out/share/doc/git2cl/README
+  '';
+
+  meta = {
+    homepage = http://josefsson.org/git2cl/;
+    description = "Convert git logs to GNU style ChangeLog files";
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
new file mode 100644
index 000000000000..698de486b5be
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
@@ -0,0 +1,42 @@
+{ pkgs, stdenv, fetchFromGitHub }:
+
+with pkgs.lib;
+
+stdenv.mkDerivation rec {
+  pname = "gitflow";
+  version = "1.11.0";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "petervanderdoes";
+    repo = pname;
+    rev = version;
+    sha256 = "0zk53g0wd5n1zlhkwlfp124i6agx8kl0cwvy0dia3jh1p51vsc1q";
+  };
+
+  buildInputs = [ pkgs.makeWrapper ];
+
+  preBuild = ''
+    makeFlagsArray+=(prefix="$out")
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/git-flow \
+      --set FLAGS_GETOPT_CMD ${pkgs.getopt}/bin/getopt \
+      --suffix PATH : ${pkgs.git}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/petervanderdoes/gitflow;
+    description = "Extend git with the Gitflow branching model";
+    longDescription = ''
+      A set of scripts that provide high-level repository operations
+      for managing feature/release/hotfix branches in a Git repository,
+      particularly suited to be utilised to follow Vincent Driessen's
+      branching model.
+    '';
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ offline jgeerds ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix
new file mode 100644
index 000000000000..ce251e11d328
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, git, gzip, perlPackages, fetchFromGitHub
+, gitwebTheme ? false }:
+
+let
+  gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
+  gitwebThemeSrc = fetchFromGitHub {
+    owner = "kogakure";
+    repo = "gitweb-theme";
+    rev = "049b88e664a359f8ec25dc6f531b7e2aa60dd1a2";
+    sha256 = "0wksqma41z36dbv6w6iplkjfdm0ha3njp222fakyh4lismajr71p";
+  };
+in stdenv.mkDerivation {
+  name = "gitweb-${stdenv.lib.getVersion git}";
+
+  src = git.gitweb;
+
+  installPhase = ''
+      mkdir $out
+      mv * $out
+
+      # gzip (and optionally bzip2, xz, zip) are runtime dependencies for
+      # gitweb.cgi, need to patch so that it's found
+      sed -i -e "s|'compressor' => \['gzip'|'compressor' => ['${gzip}/bin/gzip'|" \
+          $out/gitweb.cgi
+      # Give access to CGI.pm and friends (was removed from perl core in 5.22)
+      for p in ${stdenv.lib.concatStringsSep " " gitwebPerlLibs}; do
+          sed -i -e "/use CGI /i use lib \"$p/lib/perl5/site_perl\";" \
+              "$out/gitweb.cgi"
+      done
+
+      ${stdenv.lib.optionalString gitwebTheme "cp ${gitwebThemeSrc}/* $out/static"}
+  '';
+
+  meta = git.meta // {
+    maintainers = with stdenv.lib.maintainers; [ gnidorah ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix
new file mode 100644
index 000000000000..dd080799557b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, buildGo19Package, fetchFromGitHub, curl, libgit2_0_27, ncurses, pkgconfig, readline }:
+let
+  version = "0.3.0";
+in
+buildGo19Package {
+  name = "grv-${version}";
+
+  buildInputs = [ ncurses readline curl libgit2_0_27 ];
+  nativeBuildInputs = [ pkgconfig ];
+
+  goPackagePath = "github.com/rgburke/grv";
+
+  src = fetchFromGitHub {
+    owner = "rgburke";
+    repo = "grv";
+    rev = "v${version}";
+    sha256 = "00v502mwnpv09l7fsbq3s72i5fz5dxbildwxgw0r8zzf6d54xrgl";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    rm util/update_latest_release.go
+  '';
+
+  buildFlagsArray = [ "-ldflags=" "-X main.version=${version}" ];
+
+  meta = with stdenv.lib; {
+    description = "GRV is a terminal interface for viewing Git repositories";
+    homepage = https://github.com/rgburke/grv;
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ andir ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix
new file mode 100644
index 000000000000..acb82253406b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, buildGoPackage, fetchFromGitHub, ronn, ruby, groff, Security, utillinux }:
+
+buildGoPackage rec {
+  name = "hub-${version}";
+  version = "2.6.1";
+
+  goPackagePath = "github.com/github/hub";
+
+  src = fetchFromGitHub {
+    owner = "github";
+    repo = "hub";
+    rev = "v${version}";
+    sha256 = "1gq8nmzdsqicjgam3h48l0dad46dn9mx9blr1413rc2cp9qmg7d4";
+  };
+
+  nativeBuildInputs = [ groff ronn utillinux ];
+  buildInputs = [ ruby ] ++
+    stdenv.lib.optional stdenv.isDarwin Security;
+
+  postPatch = ''
+    mkdir bin
+    ln -s ${ronn}/bin/ronn bin/ronn
+    patchShebangs .
+  '';
+
+  postInstall = ''
+    cd go/src/${goPackagePath}
+    install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub"
+    install -D etc/hub.bash_completion.sh "$bin/etc/bash_completion.d/hub.bash_completion.sh"
+    install -D etc/hub.fish_completion  "$bin/share/fish/vendor_completions.d/hub.fish"
+
+    make man-pages
+    cp -vr --parents share/man/man[1-9]/*.[1-9] $bin/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Command-line wrapper for git that makes you better at GitHub";
+
+    license = licenses.mit;
+    homepage = https://hub.github.com/;
+    maintainers = with maintainers; [ the-kenny ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix
new file mode 100644
index 000000000000..f2d1f1d85568
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "lab-${version}";
+  version = "0.14.0";
+
+  goPackagePath = "github.com/zaquestion/lab";
+
+  src = fetchFromGitHub {
+    owner = "zaquestion";
+    repo = "lab";
+    rev = "v${version}";
+    sha256 = "0dqahzm721kpps4i33qgk78y982n8gj5afpk73qyzbraf5y3cw92";
+  };
+
+  goDeps = ./deps.nix;
+
+  meta = with stdenv.lib; {
+    description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
+    homepage = https://zaquestion.github.io/lab;
+    license = licenses.unlicense;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/deps.nix
new file mode 100644
index 000000000000..03959300b435
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/deps.nix
@@ -0,0 +1,327 @@
+# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
+[
+  {
+    goPackagePath  = "github.com/avast/retry-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/avast/retry-go";
+      rev =  "5469272a8171235352a56af37e5f7facf814423f";
+      sha256 = "0ql8x5c99sh1f4vdd5614zd0bi4z8z19228vm4xkvii11bsj8dx6";
+    };
+  }
+  {
+    goPackagePath  = "github.com/cpuguy83/go-md2man";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cpuguy83/go-md2man";
+      rev =  "20f5889cbdc3c73dbd2862796665e7c465ade7d1";
+      sha256 = "1w22dfdamsq63b5rvalh9k2y7rbwfkkjs7vm9vd4a13h2ql70lg2";
+    };
+  }
+  {
+    goPackagePath  = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev =  "346938d642f2ec3594ed81d874461961cd0faa76";
+      sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c";
+    };
+  }
+  {
+    goPackagePath  = "github.com/fsnotify/fsnotify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsnotify/fsnotify";
+      rev =  "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9";
+      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
+    };
+  }
+  {
+    goPackagePath  = "github.com/gdamore/encoding";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gdamore/encoding";
+      rev =  "b23993cbb6353f0e6aa98d0ee318a34728f628b9";
+      sha256 = "0d7irqpx2fa9vkxgkhf04yiwazsm10fxh0yk86x5crflhph5fv8a";
+    };
+  }
+  {
+    goPackagePath  = "github.com/gdamore/tcell";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gdamore/tcell";
+      rev =  "2f258105ca8ce35819115b49f5ac58197241653e";
+      sha256 = "1sji4fjd7i70lc6l19zhz718xld96k0h1sb1as1mmrx0iv858xaz";
+    };
+  }
+  {
+    goPackagePath  = "github.com/golang/protobuf";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/protobuf";
+      rev =  "b4deda0973fb4c70b50d226b1af49f3da59f5265";
+      sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq";
+    };
+  }
+  {
+    goPackagePath  = "github.com/google/go-querystring";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/go-querystring";
+      rev =  "53e6ce116135b80d037921a7fdd5138cf32d7a8a";
+      sha256 = "0lkbm067nhmxk66pyjx59d77dbjjzwyi43gdvzyx2f8m1942rq7f";
+    };
+  }
+  {
+    goPackagePath  = "github.com/hashicorp/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/hcl";
+      rev =  "ef8a98b0bbce4a65b5aa4c368430a80ddc533168";
+      sha256 = "1qalfsc31fra7hcw2lc3s20aj7al62fq3j5fn5kga3mg99b82nyr";
+    };
+  }
+  {
+    goPackagePath  = "github.com/inconshreveable/mousetrap";
+    fetch = {
+      type = "git";
+      url = "https://github.com/inconshreveable/mousetrap";
+      rev =  "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75";
+      sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
+    };
+  }
+  {
+    goPackagePath  = "github.com/lucasb-eyer/go-colorful";
+    fetch = {
+      type = "git";
+      url = "https://github.com/lucasb-eyer/go-colorful";
+      rev =  "231272389856c976b7500c4fffcc52ddf06ff4eb";
+      sha256 = "161n224v46mln3swzv0009ffj9fxg2n814l9vqs3zh9dq1dmj0jn";
+    };
+  }
+  {
+    goPackagePath  = "github.com/lunixbochs/vtclean";
+    fetch = {
+      type = "git";
+      url = "https://github.com/lunixbochs/vtclean";
+      rev =  "2d01aacdc34a083dca635ba869909f5fc0cd4f41";
+      sha256 = "1ss88dyx5hr4imvpg5lixvp0cf7c2qm4x9m8mdgshjpm92g5rqmf";
+    };
+  }
+  {
+    goPackagePath  = "github.com/magiconair/properties";
+    fetch = {
+      type = "git";
+      url = "https://github.com/magiconair/properties";
+      rev =  "c3beff4c2358b44d0493c7dda585e7db7ff28ae6";
+      sha256 = "04ccjc9nd1wffvw24ixyfw3v5g48zq7pbq1wz1zg9cyqyxy14qgr";
+    };
+  }
+  {
+    goPackagePath  = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev =  "9e777a8366cce605130a531d2cd6363d07ad7317";
+      sha256 = "0vkrfrz3fzn5n6ix4k8s0cg0b448459sldq8bp4riavsxm932jzb";
+    };
+  }
+  {
+    goPackagePath  = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev =  "00c29f56e2386353d58c599509e8dc3801b0d716";
+      sha256 = "1vw8fvhax0d567amgvxr7glcl12lvzg2sbzs007q5k5bbwn1szyb";
+    };
+  }
+  {
+    goPackagePath  = "github.com/pelletier/go-toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-toml";
+      rev =  "acdc4509485b587f5e675510c4f2c63e90ff68a8";
+      sha256 = "1y5m9pngxhsfzcnxh8ma5nsllx74wn0jr47p2n6i3inrjqxr12xh";
+    };
+  }
+  {
+    goPackagePath  = "github.com/pkg/errors";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/errors";
+      rev =  "645ef00459ed84a119197bfb8d8205042c6df63d";
+      sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
+    };
+  }
+  {
+    goPackagePath  = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev =  "792786c7400a136282c1664665ae0a8db921c6c2";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+  {
+    goPackagePath  = "github.com/rivo/tview";
+    fetch = {
+      type = "git";
+      url = "https://github.com/rivo/tview";
+      rev =  "f855bee0205c35e6a055b86cc341effea0f446ce";
+      sha256 = "0jn9r3gzvm3gr72rb7zz2g8794nnl56l8flqfav00pfk0qiqp8xw";
+    };
+  }
+  {
+    goPackagePath  = "github.com/russross/blackfriday";
+    fetch = {
+      type = "git";
+      url = "https://github.com/russross/blackfriday";
+      rev =  "55d61fa8aa702f59229e6cff85793c22e580eaf5";
+      sha256 = "0qmavm5d14kj6im6sqzpqnlhpy524428vkn4hnfwknndr9rycmn0";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/afero";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/afero";
+      rev =  "63644898a8da0bc22138abf860edaf5277b6102e";
+      sha256 = "13piahaq4vw1y1sklq5scrsflqx0a8hzmdqfz1fy4871kf2gl8qw";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/cast";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cast";
+      rev =  "8965335b8c7107321228e3e3702cab9832751bac";
+      sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev =  "615425954c3b0d9485a7027d4d451fdcdfdee84e";
+      sha256 = "01zsislgc72j86a1zq7xs7xj3lvxjjviz4lgn4144jzgppwanpk6";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/jwalterweatherman";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/jwalterweatherman";
+      rev =  "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394";
+      sha256 = "132p84i20b9s5r6fs597lsa6648vd415ch7c0d018vm8smzqpd0h";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev =  "583c0c0531f06d5278b7d917446061adc344b5cd";
+      sha256 = "0nr4mdpfhhk94hq4ymn5b2sxc47b29p1akxd8b0hx4dvdybmipb5";
+    };
+  }
+  {
+    goPackagePath  = "github.com/spf13/viper";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/viper";
+      rev =  "15738813a09db5c8e5b60a19d67d3f9bd38da3a4";
+      sha256 = "1mjfzg8zvnxckaq6l8gw99i2msrfqn9yr04dc3b7kd5bpxi6zr4v";
+    };
+  }
+  {
+    goPackagePath  = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev =  "12b6f73e6084dad08a7c6e575284b177ecafbc71";
+      sha256 = "01f80s0q64pw5drfgqwwk1wfwwkvd2lhbs56lhhkff4ni83k73fd";
+    };
+  }
+  {
+    goPackagePath  = "github.com/tcnksm/go-gitconfig";
+    fetch = {
+      type = "git";
+      url = "https://github.com/tcnksm/go-gitconfig";
+      rev =  "d154598bacbf4501c095a309753c5d4af66caa81";
+      sha256 = "0sz7h383h7ngrqkk35ic37kfvhlk07g4kanps8bnapwczrcm2am9";
+    };
+  }
+  {
+    goPackagePath  = "github.com/xanzy/go-gitlab";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xanzy/go-gitlab";
+      rev =  "8d21e61ce4a9b9c7fe645e48672872e9fdb71138";
+      sha256 = "1lac57ard1vrd16ri8gfyd0ck8d7xg7zbcjlz90223jp0vc3l8nv";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev =  "e73bf333ef8920dbb52ad18d4bd38ad9d9bc76d7";
+      sha256 = "1amcpva20vff8v0lww655icaaf7388ns8xhm859whn4w4v0vanyg";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev =  "f4c29de78a2a91c00474a2e689954305c350adf9";
+      sha256 = "02nibjrr1il8sxnr0w1s5fj7gz6ayhg3hsywf948qhc68n5adv8x";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/oauth2";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/oauth2";
+      rev =  "3d292e4d0cdc3a0113e6d207bb137145ef1de42f";
+      sha256 = "0jvivlvx7snacd6abd1prqxa7h1z6b7s6mqahn8lpqlag3asryrl";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev =  "79b0c6888797020a994db17c8510466c72fe75d9";
+      sha256 = "0aydjw886c4dwcjg7ssb7xp39ag1529nh3ly1la71rqjr94cjnag";
+    };
+  }
+  {
+    goPackagePath  = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev =  "f21a4dfb5e38f5895301dc265a8def02365cc3d0";
+      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+    };
+  }
+  {
+    goPackagePath  = "google.golang.org/appengine";
+    fetch = {
+      type = "git";
+      url = "https://github.com/golang/appengine";
+      rev =  "b1f26356af11148e710935ed1ac8a7f5702c7612";
+      sha256 = "1pz202zszg8f35dk5pfhwgcdi3r6dx1l4yk6x6ly7nb4j45zi96x";
+    };
+  }
+  {
+    goPackagePath  = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://github.com/go-yaml/yaml";
+      rev =  "5420a8b6744d3b0345ab293f6fcba19c978f1183";
+      sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1";
+    };
+  }
+]
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix
new file mode 100644
index 000000000000..d0d60b193437
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, pyxdg }:
+
+buildPythonApplication rec {
+  pname   = "pass-git-helper";
+  version = "0.4";
+
+  src = fetchFromGitHub {
+    owner  = "languitar";
+    repo   = "pass-git-helper";
+    rev    = "${version}";
+    sha256 = "1zccbmq5l6asl9qm1f90vg9467y3spmv3ayrw07qizrj43yfd9ap";
+  };
+
+  propagatedBuildInputs = [ pyxdg ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/languitar/pass-git-helper";
+    description = "A git credential helper interfacing with pass, the standard unix password manager";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ vanzef ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/pre-commit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/pre-commit/default.nix
new file mode 100644
index 000000000000..331b020d8ca7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/pre-commit/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, python3Packages }:
+with python3Packages; buildPythonApplication rec {
+  pname = "pre_commit";
+  version = "1.11.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1kjrq8z78b6aqhyyw07dlwf6cqls88kik6f5l07hs71fj5ddvs9w";
+  };
+
+  propagatedBuildInputs = [
+    aspy-yaml
+    cached-property
+    cfgv
+    identify
+    nodeenv
+    six
+    toml
+    virtualenv
+  ];
+
+  # Tests fail due to a missing windll dependency
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "A framework for managing and maintaining multi-language pre-commit hooks";
+    homepage = https://pre-commit.com/;
+    license = licenses.mit;
+    maintainers = with maintainers; [ borisbabic ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix
new file mode 100644
index 000000000000..0a88fbd09291
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, cmake, qtbase }:
+
+stdenv.mkDerivation rec {
+  name = "qgit-2.8";
+
+  src = fetchFromGitHub {
+    owner = "tibirna";
+    repo = "qgit";
+    rev = name;
+    sha256 = "01l6mz2f333x3zbfr68mizwpsh6sdsnadcavpasidiych1m5ry8f";
+  };
+
+  buildInputs = [ qtbase ];
+
+  nativeBuildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    license = licenses.gpl2;
+    homepage = http://libre.tibirna.org/projects/qgit/wiki/QGit;
+    description = "Graphical front-end to Git";
+    maintainers = with maintainers; [ peterhoeg ];
+    inherit (qtbase.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
new file mode 100644
index 000000000000..4f9a1c4e5442
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, python2, git }:
+
+let
+  name = "stgit-${version}";
+  version = "0.19";
+in
+stdenv.mkDerivation {
+  inherit name;
+
+  src = fetchFromGitHub {
+    owner = "ctmarinas";
+    repo = "stgit";
+    rev = "v${version}";
+    sha256 = "1dzl6cnyzwbzysp82x7w1yc03g25kwan3h0zpnzhhfhg6c904sis";
+  };
+
+  buildInputs = [ python2 git ];
+
+  makeFlags = "prefix=$$out";
+
+  postInstall = ''
+    mkdir -p "$out/etc/bash_completion.d/"
+    ln -s ../../share/stgit/completion/stgit-completion.bash "$out/etc/bash_completion.d/"
+  '';
+
+  doCheck = false;
+  checkTarget = "test";
+
+  meta = with stdenv.lib; {
+    description = "A patch manager implemented on top of Git";
+    homepage = http://procode.org/stgit/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ the-kenny ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix
new file mode 100644
index 000000000000..7b36a142d15d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, unzip, makeWrapper, jre }:
+
+stdenv.mkDerivation rec {
+  name = "subgit-3.2.4";
+
+  meta = {
+    description = "A tool for a smooth, stress-free SVN to Git migration";
+    longDescription = "Create writable Git mirror of a local or remote Subversion repository and use both Subversion and Git as long as you like. You may also do a fast one-time import from Subversion to Git.";
+    homepage = http://subgit.com;
+    license = stdenv.lib.licenses.unfree;
+    platforms = stdenv.lib.platforms.all;
+  };
+
+  nativeBuildInputs = [ unzip makeWrapper ];
+
+  installPhase = ''
+    mkdir $out;
+    cp -r bin lib $out;
+    wrapProgram $out/bin/subgit --set JAVA_HOME ${jre};
+  '';
+
+  src = fetchurl {
+    url = "http://subgit.com/download/${name}.zip";
+    sha256 = "13r6hi2zk46bs3j17anfc85kszlwliv2yc16qx834b3v4w68hajw";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix
new file mode 100644
index 000000000000..35c6d33d74da
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, qmake, qtbase, qttools, subversion, apr }:
+
+let
+  version = "1.0.13";
+in
+stdenv.mkDerivation {
+  name = "svn-all-fast-export-${version}";
+
+  src = fetchFromGitHub {
+    owner = "svn-all-fast-export";
+    repo = "svn2git";
+    rev = version;
+    sha256 = "0f1qj0c4cdq46mz54wcy17g7rq1fy2q0bq3sswhr7r5a2s433x4f";
+  };
+
+  nativeBuildInputs = [ qmake qttools ];
+  buildInputs = [ apr.dev subversion.dev qtbase ];
+
+  qmakeFlags = [
+    "VERSION=${version}"
+    "APR_INCLUDE=${apr.dev}/include/apr-1"
+    "SVN_INCLUDE=${subversion.dev}/include/subversion-1"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/svn-all-fast-export/svn2git;
+    description = "A fast-import based converter for an svn repo to git repos";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.flokli ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
new file mode 100644
index 000000000000..d00fdd0c29e0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, ruby, makeWrapper, git }:
+
+let
+  version = "2.4.0";
+in
+stdenv.mkDerivation {
+  name = "svn2git-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/nirvdrum/svn2git/archive/v${version}.tar.gz";
+    sha256 = "0ly2vrv6q31n0xhciwb7a1ilr5c6ndyi3bg81yfp4axiypps7l41";
+  };
+
+  buildInputs = [ ruby makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r lib $out/
+
+    mkdir -p $out/bin
+    substituteInPlace bin/svn2git --replace '/usr/bin/env ruby' ${ruby}/bin/ruby
+    cp bin/svn2git $out/bin/
+    chmod +x $out/bin/svn2git
+
+    wrapProgram $out/bin/svn2git \
+      --set RUBYLIB $out/lib \
+      --prefix PATH : ${git}/bin
+  '';
+
+  meta = {
+    homepage = https://github.com/nirvdrum/svn2git;
+    description = "Tool for importing Subversion repositories into git";
+    license = stdenv.lib.licenses.mit;
+
+    maintainers = [ stdenv.lib.maintainers.the-kenny ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix
new file mode 100644
index 000000000000..a407f6e7ab12
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchFromGitHub, ncurses, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45
+, readline, makeWrapper, git, libiconv, autoreconfHook, findXMLCatalogs, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tig";
+  version = "2.4.1";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "jonas";
+    repo = pname;
+    rev = name;
+    sha256 = "0i26yfn2vjgsg1kdvhhv55jwzds7ih7cnad1xqvilqm83zh47ksd";
+  };
+
+  nativeBuildInputs = [ makeWrapper autoreconfHook asciidoc xmlto docbook_xsl docbook_xml_dtd_45 findXMLCatalogs pkgconfig ];
+
+  autoreconfFlags = "-I tools -v";
+
+  buildInputs = [ ncurses readline git ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
+
+  # those files are inherently impure, we'll handle the corresponding dependencies.
+  postPatch = ''
+      rm -f contrib/config.make-*
+  '';
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    make install
+    make install-doc
+
+    substituteInPlace contrib/tig-completion.zsh \
+      --replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/etc/bash_completion.d/tig-completion.bash"
+
+    install -D contrib/tig-completion.bash $out/etc/bash_completion.d/tig-completion.bash
+    install -D contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig
+    cp contrib/vim.tigrc $out/etc/
+
+    wrapProgram $out/bin/tig \
+      --prefix PATH ':' "${git}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://jonas.github.io/tig/;
+    description = "Text-mode interface for git";
+    maintainers = with maintainers; [ garbas bjornfor domenkozar qknight ];
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix
new file mode 100644
index 000000000000..c183bbde7e6b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "topgit-0.9";
+
+  src = fetchurl {
+    url = "https://github.com/greenrd/topgit/archive/${name}.tar.gz";
+    sha256 = "1z9x42a0cmn8n2n961qcfl522nd6j9a3dpx1jbqfp24ddrk5zd94";
+  };
+
+  configurePhase = "makeFlags=prefix=$out";
+
+  postInstall = ''
+    mkdir -p "$out/share/doc/${name}" "$out/etc/bash_completion.d/"
+    mv README "$out/share/doc/${name}/"
+    mv contrib/tg-completion.bash "$out/etc/bash_completion.d/"
+  '';
+
+  meta = {
+    homepage = https://github.com/greenrd/topgit;
+    description = "TopGit manages large amount of interdependent topic branches";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ marcweber ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix
new file mode 100644
index 000000000000..35e9c17438f7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, git, makeWrapper, openssl }:
+
+stdenv.mkDerivation rec {
+  name = "transcrypt-${version}";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "elasticdog";
+    repo = "transcrypt";
+    rev = "v${version}";
+    sha256 = "1dkr69plk16wllk5bzlkchrzw63pk239dgbjhrb3mb61i065jdam";
+  };
+
+  buildInputs = [ git makeWrapper openssl ];
+
+  installPhase = ''
+    install -m 755 -D transcrypt $out/bin/transcrypt
+    install -m 644 -D man/transcrypt.1 $out/share/man/man1/transcrypt.1
+    install -m 644 -D contrib/bash/transcrypt $out/share/bash-completion/completions/transcrypt
+    install -m 644 -D contrib/zsh/_transcrypt $out/share/zsh/site-functions/_transcrypt
+
+    wrapProgram $out/bin/transcrypt \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git openssl ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Transparently encrypt files within a Git repository";
+    longDescription = ''
+      A script to configure transparent encryption of sensitive files stored in
+      a Git repository. Files that you choose will be automatically encrypted
+      when you commit them, and automatically decrypted when you check them
+      out. The process will degrade gracefully, so even people without your
+      encryption password can safely commit changes to the repository's
+      non-encrypted files.
+    '';
+    homepage = https://github.com/elasticdog/transcrypt;
+    license = licenses.mit;
+    maintainers = [ maintainers.elasticdog ];
+    platforms = platforms.all;
+  };
+}