Merge pull request #14207 from zimbatm/git-and-ssh
git: add openssh as a runtime dependency
This commit is contained in:
commit
0592eb377e
@ -8,7 +8,7 @@ let
|
|||||||
gitBase = lib.makeOverridable (import ./git) {
|
gitBase = lib.makeOverridable (import ./git) {
|
||||||
inherit fetchurl stdenv curl openssl zlib expat perl python gettext gnugrep
|
inherit fetchurl stdenv curl openssl zlib expat perl python gettext gnugrep
|
||||||
asciidoc xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt cpio tcl
|
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;
|
texinfo = texinfo5;
|
||||||
svnSupport = false; # for git-svn support
|
svnSupport = false; # for git-svn support
|
||||||
guiSupport = false; # requires tcl/tk
|
guiSupport = false; # requires tcl/tk
|
||||||
|
@ -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
|
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
|
||||||
, libxslt, tcl, tk, makeWrapper, libiconv
|
, libxslt, tcl, tk, makeWrapper, libiconv
|
||||||
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
|
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
|
||||||
@ -25,8 +26,16 @@ stdenv.mkDerivation {
|
|||||||
./docbook2texi.patch
|
./docbook2texi.patch
|
||||||
./symlinks-in-bin.patch
|
./symlinks-in-bin.patch
|
||||||
./git-sh-i18n.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]
|
buildInputs = [curl openssl zlib expat gettext cpio makeWrapper libiconv]
|
||||||
++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
|
++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
|
||||||
docbook_xsl docbook_xml_dtd_45 libxslt ]
|
docbook_xsl docbook_xml_dtd_45 libxslt ]
|
||||||
|
@ -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)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user