2010-05-19 13:26:06 +01:00
|
|
|
{ stdenv, fetchurl, zlib, openssl, perl, libedit, pkgconfig, pam
|
2009-10-01 13:07:33 +01:00
|
|
|
, etcDir ? null
|
2009-11-02 21:49:06 +00:00
|
|
|
, hpnSupport ? false
|
2006-12-11 03:24:35 +00:00
|
|
|
}:
|
2006-01-17 18:48:18 +00:00
|
|
|
|
2010-02-01 16:56:10 +00:00
|
|
|
let
|
2009-10-01 13:07:33 +01:00
|
|
|
|
2010-02-01 16:56:10 +00:00
|
|
|
hpnSrc = fetchurl {
|
2011-04-13 21:24:06 +01:00
|
|
|
url = http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.8p1-hpn13v11.diff.gz;
|
|
|
|
sha256 = "1xwx2m2sihpy57mwdnc9km3c72hxfdjyp5mmr1vcx2c8kp901db2";
|
2004-08-02 12:55:31 +01:00
|
|
|
};
|
2009-10-01 13:07:33 +01:00
|
|
|
|
2010-02-01 16:56:10 +00:00
|
|
|
in
|
2006-12-11 03:24:35 +00:00
|
|
|
|
2010-02-01 16:56:10 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2011-02-08 13:13:34 +00:00
|
|
|
name = "openssh-5.8p1";
|
2006-12-11 03:24:35 +00:00
|
|
|
|
2010-02-01 16:56:10 +00:00
|
|
|
src = fetchurl {
|
2010-04-22 21:12:09 +01:00
|
|
|
url = "ftp://ftp.nl.uu.net/pub/OpenBSD/OpenSSH/portable/${name}.tar.gz";
|
2011-02-08 13:13:34 +00:00
|
|
|
sha256 = "0frjn6vc0jhj5gwfl95rdnjn1h9nlcaanr4xqmwyg9b26n7pmiz1";
|
2010-02-01 16:56:10 +00:00
|
|
|
};
|
2006-12-11 03:24:35 +00:00
|
|
|
|
2010-05-09 13:44:09 +01:00
|
|
|
prePatch = stdenv.lib.optionalString hpnSupport
|
2010-02-01 16:56:10 +00:00
|
|
|
''
|
|
|
|
gunzip -c ${hpnSrc} | patch -p1
|
|
|
|
'';
|
2010-08-25 22:12:36 +01:00
|
|
|
|
2010-05-09 13:44:09 +01:00
|
|
|
patches = [ ./locale_archive.patch ];
|
2010-05-19 13:26:06 +01:00
|
|
|
|
|
|
|
buildInputs = [ zlib openssl perl libedit pkgconfig pam ];
|
2010-02-01 16:56:10 +00:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
''
|
|
|
|
--with-mantype=man
|
2010-04-22 19:16:18 +01:00
|
|
|
--with-libedit=yes
|
2010-05-19 13:26:06 +01:00
|
|
|
${if pam != null then "--with-pam" else "--without-pam"}
|
2010-02-01 16:56:10 +00:00
|
|
|
${if etcDir != null then "--sysconfdir=${etcDir}" else ""}
|
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
configureFlags="$configureFlags --with-privsep-path=$out/empty"
|
|
|
|
ensureDir $out/empty
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Install ssh-copy-id, it's very useful.
|
|
|
|
cp contrib/ssh-copy-id $out/bin/
|
|
|
|
chmod +x $out/bin/ssh-copy-id
|
|
|
|
cp contrib/ssh-copy-id.1 $out/share/man/man1/
|
2010-02-01 17:04:07 +00:00
|
|
|
|
|
|
|
ensureDir $out/etc/ssh
|
|
|
|
cp moduli $out/etc/ssh/
|
2010-02-01 16:56:10 +00:00
|
|
|
'';
|
2007-05-15 14:10:41 +01:00
|
|
|
|
2009-10-01 14:06:41 +01:00
|
|
|
installTargets = "install-nosysconf";
|
2010-02-01 16:56:10 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.openssh.org/;
|
|
|
|
description = "An implementation of the SSH protocol";
|
|
|
|
license = "bsd";
|
|
|
|
};
|
2004-08-02 12:55:31 +01:00
|
|
|
}
|