3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/openssh/default.nix
Eelco Dolstra 7d45b35d1e * OpenSSH 5.2.
svn path=/nixpkgs/trunk/; revision=15689
2009-05-23 16:14:26 +00:00

39 lines
951 B
Nix

{ stdenv, fetchurl, zlib, openssl, perl
, pamSupport ? false, pam ? null
}:
assert pamSupport -> pam != null;
stdenv.mkDerivation rec {
name = "openssh-5.2p1";
src = fetchurl {
url = "ftp://ftp.nluug.nl/pub/security/OpenSSH/${name}.tar.gz";
sha256 = "1bpc6i07hlakb9vrxr8zb1yxnc9avsv7kjwrcagdgcyh6w6728s0";
};
buildInputs = [zlib openssl perl
(if pamSupport then pam else null)
];
configureFlags = "
--with-mantype=man
${if pamSupport then "--with-pam" else ""}
";
preConfigure = "
configureFlags=\"$configureFlags --with-privsep-path=$out/empty\"
ensureDir $out/empty
substituteInPlace pathnames.h --replace 'SSHDIR \"/ssh_config\"' '\"/etc/ssh/ssh_config\"'
";
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/
";
installTargets = "install-nokeys";
}