2006-12-11 04:24:35 +01:00
|
|
|
{ stdenv, fetchurl, zlib, openssl, perl
|
|
|
|
, pamSupport ? false, pam ? null
|
2009-10-01 14:07:33 +02:00
|
|
|
, etcDir ? null
|
2009-11-02 22:49:06 +01:00
|
|
|
, hpnSupport ? false
|
2006-12-11 04:24:35 +01:00
|
|
|
}:
|
2006-01-17 19:48:18 +01:00
|
|
|
|
2006-12-11 04:24:35 +01:00
|
|
|
assert pamSupport -> pam != null;
|
2009-10-01 14:07:33 +02:00
|
|
|
|
2009-11-02 22:49:06 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2009-05-23 18:14:26 +02:00
|
|
|
name = "openssh-5.2p1";
|
2009-10-01 14:07:33 +02:00
|
|
|
|
2004-08-02 13:55:31 +02:00
|
|
|
src = fetchurl {
|
2009-05-23 18:14:26 +02:00
|
|
|
url = "ftp://ftp.nluug.nl/pub/security/OpenSSH/${name}.tar.gz";
|
|
|
|
sha256 = "1bpc6i07hlakb9vrxr8zb1yxnc9avsv7kjwrcagdgcyh6w6728s0";
|
2004-08-02 13:55:31 +02:00
|
|
|
};
|
2009-10-01 14:07:33 +02:00
|
|
|
|
2006-12-11 04:24:35 +01:00
|
|
|
buildInputs = [zlib openssl perl
|
|
|
|
(if pamSupport then pam else null)
|
2006-01-17 19:48:18 +01:00
|
|
|
];
|
2006-12-11 04:24:35 +01:00
|
|
|
|
|
|
|
configureFlags = "
|
2007-10-22 13:41:30 +02:00
|
|
|
--with-mantype=man
|
2009-10-01 14:07:33 +02:00
|
|
|
${if pamSupport then "--with-pam" else "--without-pam"}
|
|
|
|
${if etcDir != null then "--sysconfdir=${etcDir}" else ""}
|
2006-12-11 04:24:35 +01:00
|
|
|
";
|
|
|
|
|
|
|
|
preConfigure = "
|
|
|
|
configureFlags=\"$configureFlags --with-privsep-path=$out/empty\"
|
|
|
|
ensureDir $out/empty
|
|
|
|
";
|
|
|
|
|
2007-05-15 15:10:41 +02: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 13:41:30 +02:00
|
|
|
cp contrib/ssh-copy-id.1 $out/share/man/man1/
|
2007-05-15 15:10:41 +02:00
|
|
|
";
|
|
|
|
|
2009-10-01 15:06:41 +02:00
|
|
|
installTargets = "install-nosysconf";
|
2009-11-02 22:49:06 +01:00
|
|
|
} //
|
|
|
|
(if hpnSupport then
|
|
|
|
rec {
|
|
|
|
hpnSrc = fetchurl {
|
|
|
|
url = http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn13v6.diff.gz;
|
|
|
|
sha256 = "1g91xl1vfg772072qcbcfzyqj7yfvm38xgk8zyy8wsl2g81rb8wh";
|
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
gunzip -c ${hpnSrc} | patch -p1
|
|
|
|
'';
|
2004-08-02 13:55:31 +02:00
|
|
|
}
|
2009-11-02 22:49:06 +01:00
|
|
|
else {}))
|