3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/mosh/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.8 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, zlib, protobuf, ncurses, pkg-config
, makeWrapper, perl, openssl, autoreconfHook, openssh, bash-completion
2022-10-06 18:43:15 +01:00
, withUtempter ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, libutempter }:
stdenv.mkDerivation rec {
2020-11-23 22:12:43 +00:00
pname = "mosh";
version = "1.4.0";
src = fetchFromGitHub {
owner = "mobile-shell";
repo = pname;
rev = "mosh-${version}";
hash = "sha256-tlSsHu7JnXO+sorVuWWubNUNdb9X0/pCaiGG5Y0X/g8=";
};
nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper protobuf perl ];
buildInputs = [ protobuf ncurses zlib openssl bash-completion perl ]
++ lib.optional withUtempter libutempter;
2022-04-04 07:24:17 +01:00
strictDeps = true;
2020-03-18 22:57:43 +00:00
enableParallelBuilding = true;
patches = [
./ssh_path.patch
./mosh-client_path.patch
./utempter_path.patch
# Fix build with bash-completion 2.10
./bash_completion_datadir.patch
];
2017-01-28 18:21:24 +00:00
postPatch = ''
substituteInPlace scripts/mosh.pl \
--subst-var-by ssh "${openssh}/bin/ssh" \
--subst-var-by mosh-client "$out/bin/mosh-client"
2017-01-28 18:21:24 +00:00
'';
configureFlags = [ "--enable-completion" ]
++ lib.optional withUtempter "--with-utempter";
postInstall = ''
wrapProgram $out/bin/mosh --prefix PERL5LIB : $PERL5LIB
'';
2021-01-15 09:19:50 +00:00
CXXFLAGS = lib.optionalString stdenv.cc.isClang "-std=c++11";
2021-02-12 03:26:10 +00:00
meta = with lib; {
homepage = "https://mosh.org/";
description = "Mobile shell (ssh replacement)";
longDescription = ''
Remote terminal application that allows roaming, supports intermittent
connectivity, and provides intelligent local echo and line editing of
user keystrokes.
Mosh is a replacement for SSH. It's more robust and responsive,
especially over Wi-Fi, cellular, and long-distance links.
'';
2021-02-12 03:26:10 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [ viric SuperSandro2000 ];
2021-02-12 03:26:10 +00:00
platforms = platforms.unix;
};
}