nixpkgs/pkgs/tools/networking/mosh/default.nix

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

66 lines
2.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, zlib, protobuf, ncurses, pkg-config
2023-09-15 23:21:50 +00:00
, makeWrapper, perl, openssl, autoreconfHook, openssh, bash-completion, fetchpatch
2022-10-06 17:43:15 +00: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 06:24:17 +00:00
strictDeps = true;
2020-03-18 22:57:43 +00:00
enableParallelBuilding = true;
patches = [
./ssh_path.patch
./mosh-client_path.patch
# Fix build with bash-completion 2.10
./bash_completion_datadir.patch
2023-09-15 23:21:50 +00:00
# Fixes build with protobuf3 23.x
(fetchpatch {
url = "https://github.com/mobile-shell/mosh/commit/eee1a8cf413051c2a9104e8158e699028ff56b26.patch";
hash = "sha256-CouLHWSsyfcgK3k7CvTK3FP/xjdb1pfsSXYYQj3NmCQ=";
})
];
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-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;
2024-09-08 15:31:34 +00:00
maintainers = with lib.maintainers; [ skeuchel ];
2021-02-12 03:26:10 +00:00
platforms = platforms.unix;
};
}