Reduce amount of mosh rebuilds
This commit is contained in:
parent
096219467f
commit
45c86461ad
5 changed files with 72 additions and 4 deletions
|
@ -74,10 +74,10 @@ in
|
|||
plover.dev = plover;
|
||||
mosh = prev.mosh.overrideAttrs (old: {
|
||||
patches = [
|
||||
"${nixpkgs}/pkgs/tools/networking/mosh/ssh_path.patch"
|
||||
"${nixpkgs}/pkgs/tools/networking/mosh/mosh-client_path.patch"
|
||||
"${nixpkgs}/pkgs/tools/networking/mosh/utempter_path.patch"
|
||||
"${nixpkgs}/pkgs/tools/networking/mosh/bash_completion_datadir.patch"
|
||||
./mosh/ssh_path.patch
|
||||
./mosh/mosh-client_path.patch
|
||||
./mosh/utempter_path.patch
|
||||
./mosh/bash_completion_datadir.patch
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace scripts/mosh.pl \
|
||||
|
|
19
config/workarounds/mosh/bash_completion_datadir.patch
Normal file
19
config/workarounds/mosh/bash_completion_datadir.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index 3ad983d..ff8ff96 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -476,13 +476,7 @@ AS_IF([echo "$protobuf_LIBS" | grep -q -- -pthread],
|
||||
|
||||
# Bash completion needs to ask where it goes if >= 2.0 is installed.
|
||||
AS_IF([test "$install_completion" != no],
|
||||
- [PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0],
|
||||
- [if test "$prefix" = "NONE"; then
|
||||
- completions="`pkg-config --variable=completionsdir bash-completion`"
|
||||
- else
|
||||
- completions="`pkg-config --define-variable=prefix=$prefix --variable=completionsdir bash-completion`"
|
||||
- fi],
|
||||
- [completions="${sysconfdir}/bash_completion.d"])
|
||||
+ [completions="`pkg-config --define-variable=datadir=$datadir --variable=completionsdir bash-completion`"]
|
||||
AC_SUBST([completions])])
|
||||
|
||||
AC_CONFIG_FILES([
|
22
config/workarounds/mosh/mosh-client_path.patch
Normal file
22
config/workarounds/mosh/mosh-client_path.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/scripts/mosh.pl b/scripts/mosh.pl
|
||||
index 56e96d7..2a2177e 100755
|
||||
--- a/scripts/mosh.pl
|
||||
+++ b/scripts/mosh.pl
|
||||
@@ -61,7 +61,7 @@ my $have_ipv6 = eval {
|
||||
|
||||
$|=1;
|
||||
|
||||
-my $client = 'mosh-client';
|
||||
+my $client = '@mosh-client@';
|
||||
my $server = 'mosh-server';
|
||||
|
||||
my $predict = undef;
|
||||
@@ -91,7 +91,7 @@ my @cmdline = @ARGV;
|
||||
my $usage =
|
||||
qq{Usage: $0 [options] [--] [user@]host [command...]
|
||||
--client=PATH mosh client on local machine
|
||||
- (default: "mosh-client")
|
||||
+ (default: "@mosh-client@")
|
||||
--server=COMMAND mosh server on remote machine
|
||||
(default: "mosh-server")
|
||||
|
13
config/workarounds/mosh/ssh_path.patch
Normal file
13
config/workarounds/mosh/ssh_path.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git i/scripts/mosh.pl w/scripts/mosh.pl
|
||||
index c511482..55bf5f3 100755
|
||||
--- i/scripts/mosh.pl
|
||||
+++ w/scripts/mosh.pl
|
||||
@@ -66,7 +66,7 @@ my $use_remote_ip = 'proxy';
|
||||
my $family = 'prefer-inet';
|
||||
my $port_request = undef;
|
||||
|
||||
-my @ssh = ('ssh');
|
||||
+my @ssh = ('@ssh@');
|
||||
|
||||
my $term_init = 1;
|
||||
|
14
config/workarounds/mosh/utempter_path.patch
Normal file
14
config/workarounds/mosh/utempter_path.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff -ur mosh-1.3.2/src/frontend/mosh-server.cc mosh-1.3.2.patched/src/frontend/mosh-server.cc
|
||||
--- mosh-1.3.2/src/frontend/mosh-server.cc 2017-07-22 23:14:53.000000000 +0200
|
||||
+++ mosh-1.3.2.patched/src/frontend/mosh-server.cc 2018-06-06 10:45:50.725352804 +0200
|
||||
@@ -351,6 +351,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef HAVE_UTEMPTER
|
||||
+ utempter_set_helper( "utempter" );
|
||||
+#endif
|
||||
+
|
||||
try {
|
||||
return run_server( desired_ip, desired_port, command_path, command_argv, colors, verbose, with_motd );
|
||||
} catch ( const Network::NetworkException &e ) {
|
Loading…
Reference in a new issue