mosh: add withClient to allow perlless server-only builds (#474070)

This commit is contained in:
Gergő Gutyina
2026-01-09 13:41:37 +00:00
committed by GitHub
+15 -3
View File
@@ -15,6 +15,8 @@
fetchpatch,
withUtempter ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isMusl,
libutempter,
# build server binary only when set to false (useful for perlless systems)
withClient ? true,
}:
stdenv.mkDerivation rec {
@@ -41,6 +43,8 @@ stdenv.mkDerivation rec {
zlib
openssl
bash-completion
]
++ lib.optionals withClient [
perl
]
++ lib.optional withUtempter libutempter;
@@ -70,9 +74,17 @@ stdenv.mkDerivation rec {
configureFlags = [ "--enable-completion" ] ++ lib.optional withUtempter "--with-utempter";
postInstall = ''
wrapProgram $out/bin/mosh --prefix PERL5LIB : $PERL5LIB
'';
postInstall =
if withClient then
''
wrapProgram $out/bin/mosh --prefix PERL5LIB : $PERL5LIB
''
else
''
rm $out/bin/mosh
rm $out/bin/mosh-client
rm -r $out/share/{man,bash-completion}
'';
meta = {
homepage = "https://mosh.org/";