diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index 584c880566ac..fa8f43a45c6f 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -8,7 +8,7 @@ let gitBase = lib.makeOverridable (import ./git) { inherit fetchurl stdenv curl openssl zlib expat perl python gettext gnugrep asciidoc xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt cpio tcl - tk makeWrapper subversionClient gzip libiconv; + tk makeWrapper subversionClient gzip openssh libiconv; texinfo = texinfo5; svnSupport = false; # for git-svn support guiSupport = false; # requires tcl/tk diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 82a3dc79d7c5..4f41ffb916ef 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -1,4 +1,5 @@ -{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, python, gettext, cpio, gnugrep, gzip +{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, python, gettext, cpio +, gnugrep, gzip, openssh , asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45 , libxslt, tcl, tk, makeWrapper, libiconv , svnSupport, subversionClient, perlLibs, smtpPerlLibs @@ -25,8 +26,16 @@ stdenv.mkDerivation { ./docbook2texi.patch ./symlinks-in-bin.patch ./git-sh-i18n.patch + ./ssh-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 + ''; + buildInputs = [curl openssl zlib expat gettext cpio makeWrapper libiconv] ++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt ] diff --git a/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch b/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch new file mode 100644 index 000000000000..26db3d810823 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch @@ -0,0 +1,26 @@ +diff --git a/connect.c b/connect.c +index fd7ffe1..20cd992 100644 +--- a/connect.c ++++ b/connect.c +@@ -768,7 +768,7 @@ struct child_process *git_connect(int fd[2], const char *url, + + ssh = getenv("GIT_SSH"); + if (!ssh) +- ssh = "ssh"; ++ ssh = "@ssh@"; + + ssh_dup = xstrdup(ssh); + base = basename(ssh_dup); +diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl +index 50029d0..17b9594 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) + }