2006-12-11 03:24:35 +00:00
|
|
|
{ stdenv, fetchurl, zlib, openssl, perl
|
|
|
|
, pamSupport ? false, pam ? null
|
|
|
|
}:
|
2006-01-17 18:48:18 +00:00
|
|
|
|
2006-12-11 03:24:35 +00:00
|
|
|
assert pamSupport -> pam != null;
|
2004-08-02 12:55:31 +01:00
|
|
|
|
2009-05-23 17:14:26 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openssh-5.2p1";
|
2004-08-02 12:55:31 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-05-23 17:14:26 +01:00
|
|
|
url = "ftp://ftp.nluug.nl/pub/security/OpenSSH/${name}.tar.gz";
|
|
|
|
sha256 = "1bpc6i07hlakb9vrxr8zb1yxnc9avsv7kjwrcagdgcyh6w6728s0";
|
2004-08-02 12:55:31 +01:00
|
|
|
};
|
|
|
|
|
2006-12-11 03:24:35 +00:00
|
|
|
buildInputs = [zlib openssl perl
|
|
|
|
(if pamSupport then pam else null)
|
2006-01-17 18:48:18 +00:00
|
|
|
];
|
2006-12-11 03:24:35 +00:00
|
|
|
|
|
|
|
configureFlags = "
|
2007-10-22 12:41:30 +01:00
|
|
|
--with-mantype=man
|
2006-12-11 03:24:35 +00:00
|
|
|
${if pamSupport then "--with-pam" else ""}
|
|
|
|
";
|
|
|
|
|
|
|
|
preConfigure = "
|
|
|
|
configureFlags=\"$configureFlags --with-privsep-path=$out/empty\"
|
|
|
|
ensureDir $out/empty
|
2007-12-04 12:28:22 +00:00
|
|
|
substituteInPlace pathnames.h --replace 'SSHDIR \"/ssh_config\"' '\"/etc/ssh/ssh_config\"'
|
2006-12-11 03:24:35 +00:00
|
|
|
";
|
|
|
|
|
2007-05-15 14:10:41 +01:00
|
|
|
postInstall = "
|
|
|
|
# Install ssh-copy-id, it's very useful.
|
|
|
|
cp contrib/ssh-copy-id $out/bin/
|
|
|
|
chmod +x $out/bin/ssh-copy-id
|
2007-10-22 12:41:30 +01:00
|
|
|
cp contrib/ssh-copy-id.1 $out/share/man/man1/
|
2007-05-15 14:10:41 +01:00
|
|
|
";
|
|
|
|
|
2007-01-06 16:53:10 +00:00
|
|
|
installTargets = "install-nokeys";
|
2004-08-02 12:55:31 +01:00
|
|
|
}
|