1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/tools/networking/openssh/default.nix
Lluís Batlle i Rossell 5704c1854d Fixing openssh build, so it doesn't try to put anything in /etc/ssh (and of course, it doesn't
fail if /etc/ssh/sshd_config can't be overwritten, which was my main motivation on this patch)

svn path=/nixpkgs/trunk/; revision=17573
2009-10-01 13:06:41 +00:00

40 lines
948 B
Nix

{ stdenv, fetchurl, zlib, openssl, perl
, pamSupport ? false, pam ? null
, etcDir ? 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 "--without-pam"}
${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/
";
installTargets = "install-nosysconf";
}