nixpkgs/pkgs/servers/ftp/vsftpd/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, libcap, libseccomp, openssl, pam, nixosTests }:
2013-11-07 15:14:59 +00:00
stdenv.mkDerivation rec {
pname = "vsftpd";
2021-08-17 21:01:21 +00:00
version = "3.0.5";
2013-11-07 15:14:59 +00:00
src = fetchurl {
url = "https://security.appspot.com/downloads/vsftpd-${version}.tar.gz";
2021-08-17 21:01:21 +00:00
sha256 = "sha256-JrYCrkVLC6bZnvRKCba54N+n9nIoEGc23x8njHC8kdM=";
};
buildInputs = [ libcap openssl libseccomp pam ];
patches = [ ./CVE-2015-1419.patch ];
postPatch = ''
2013-11-07 15:14:59 +00:00
sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h
substituteInPlace Makefile \
--replace -dirafter "" \
--replace /usr $out \
--replace /etc $out/etc \
--replace "-Werror" ""
mkdir -p $out/sbin $out/man/man{5,8}
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
];
NIX_LDFLAGS = "-lcrypt -lssl -lcrypto -lpam -lcap -lseccomp";
enableParallelBuilding = true;
passthru = {
tests = { inherit (nixosTests) vsftpd; };
};
meta = with lib; {
description = "A very secure FTP daemon";
license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
2013-11-07 15:14:59 +00:00
}