2021-01-15 12:19:50 +03:00
|
|
|
{ lib, stdenv, fetchurl, gperf, guile, gmp, zlib, liboop, readline, gnum4, pam
|
2022-09-29 18:20:34 +03:00
|
|
|
, nettools, lsof, procps, libxcrypt }:
|
2008-02-12 13:51:44 +03:00
|
|
|
|
2009-09-08 14:31:07 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-01 23:48:53 +03:00
|
|
|
pname = "lsh";
|
|
|
|
version = "2.0.4";
|
|
|
|
|
2008-02-12 13:51:44 +03:00
|
|
|
src = fetchurl {
|
2021-08-01 23:48:53 +03:00
|
|
|
url = "mirror://gnu/lsh/lsh-${version}.tar.gz";
|
2008-02-12 13:51:44 +03:00
|
|
|
sha256 = "614b9d63e13ad3e162c82b6405d1f67713fc622a8bc11337e72949d613713091";
|
|
|
|
};
|
|
|
|
|
2009-09-08 14:29:22 +04:00
|
|
|
patches = [ ./pam-service-name.patch ./lshd-no-root-login.patch ];
|
2009-03-15 17:11:21 +03:00
|
|
|
|
2009-09-07 17:45:06 +04:00
|
|
|
preConfigure = ''
|
|
|
|
# Patch `lsh-make-seed' so that it can gather enough entropy.
|
|
|
|
sed -i "src/lsh-make-seed.c" \
|
|
|
|
-e "s|/usr/sbin/arp|${nettools}/sbin/arp|g ;
|
|
|
|
s|/usr/bin/netstat|${nettools}/bin/netstat|g ;
|
|
|
|
s|/usr/local/bin/lsof|${lsof}/bin/lsof|g ;
|
|
|
|
s|/bin/vmstat|${procps}/bin/vmstat|g ;
|
|
|
|
s|/bin/ps|${procps}/bin/sp|g ;
|
|
|
|
s|/usr/bin/w|${procps}/bin/w|g ;
|
|
|
|
s|/usr/bin/df|$(type -P df)|g ;
|
|
|
|
s|/usr/bin/ipcs|$(type -P ipcs)|g ;
|
|
|
|
s|/usr/bin/uptime|$(type -P uptime)|g"
|
2012-04-05 20:26:44 +04:00
|
|
|
|
|
|
|
# Skip the `configure' script that checks whether /dev/ptmx & co. work as
|
|
|
|
# expected, because it relies on impurities (for instance, /dev/pts may
|
|
|
|
# be unavailable in chroots.)
|
|
|
|
export lsh_cv_sys_unix98_ptys=yes
|
2009-09-07 17:45:06 +04:00
|
|
|
'';
|
|
|
|
|
2022-05-17 18:50:37 +03:00
|
|
|
# -fcommon: workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: liblsh.a(unix_user.o):/build/lsh-2.0.4/src/server_userauth.h:108: multiple definition of
|
|
|
|
# `server_userauth_none_preauth'; lshd.o:/build/lsh-2.0.4/src/server_userauth.h:108: first defined here
|
|
|
|
# Should be present in upcoming 2.1 release.
|
2023-02-19 22:23:32 +03:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-std=gnu90 -fcommon";
|
2016-03-28 19:59:34 +03:00
|
|
|
|
2022-09-29 18:20:34 +03:00
|
|
|
buildInputs = [ gperf guile gmp zlib liboop readline gnum4 pam libxcrypt ];
|
2008-02-12 13:51:44 +03:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 18:21:08 +04:00
|
|
|
description = "GPL'd implementation of the SSH protocol";
|
2009-03-15 17:11:21 +03:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
lsh is a free implementation (in the GNU sense) of the ssh
|
|
|
|
version 2 protocol, currently being standardised by the IETF
|
|
|
|
SECSH working group.
|
|
|
|
'';
|
2009-09-07 17:45:06 +04:00
|
|
|
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "http://www.lysator.liu.se/~nisse/lsh/";
|
2021-01-15 12:19:50 +03:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2009-09-07 17:45:06 +04:00
|
|
|
|
2015-01-14 00:33:24 +03:00
|
|
|
maintainers = [ ];
|
2014-08-08 19:58:34 +04:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2008-02-12 13:51:44 +03:00
|
|
|
};
|
|
|
|
}
|