16 withUtempter ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl,
20 stdenv.mkDerivation rec {
24 src = fetchFromGitHub {
25 owner = "mobile-shell";
27 rev = "mosh-${version}";
28 hash = "sha256-tlSsHu7JnXO+sorVuWWubNUNdb9X0/pCaiGG5Y0X/g8=";
45 ] ++ lib.optional withUtempter libutempter;
49 enableParallelBuilding = true;
53 ./mosh-client_path.patch
54 # Fix build with bash-completion 2.10
55 ./bash_completion_datadir.patch
57 # Fixes build with protobuf3 23.x
59 url = "https://github.com/mobile-shell/mosh/commit/eee1a8cf413051c2a9104e8158e699028ff56b26.patch";
60 hash = "sha256-CouLHWSsyfcgK3k7CvTK3FP/xjdb1pfsSXYYQj3NmCQ=";
65 substituteInPlace scripts/mosh.pl \
66 --subst-var-by ssh "${openssh}/bin/ssh" \
67 --subst-var-by mosh-client "$out/bin/mosh-client"
70 configureFlags = [ "--enable-completion" ] ++ lib.optional withUtempter "--with-utempter";
73 wrapProgram $out/bin/mosh --prefix PERL5LIB : $PERL5LIB
77 homepage = "https://mosh.org/";
78 description = "Mobile shell (ssh replacement)";
80 Remote terminal application that allows roaming, supports intermittent
81 connectivity, and provides intelligent local echo and line editing of
84 Mosh is a replacement for SSH. It's more robust and responsive,
85 especially over Wi-Fi, cellular, and long-distance links.
87 license = licenses.gpl3Plus;
88 maintainers = with lib.maintainers; [ skeuchel ];
89 platforms = platforms.unix;