1 { lib, stdenv, fetchurl, libcap, libseccomp, openssl, pam, libxcrypt, nixosTests }:
3 stdenv.mkDerivation rec {
8 url = "https://security.appspot.com/downloads/vsftpd-${version}.tar.gz";
9 sha256 = "sha256-JrYCrkVLC6bZnvRKCba54N+n9nIoEGc23x8njHC8kdM=";
12 buildInputs = [ libcap openssl libseccomp pam libxcrypt ];
14 patches = [ ./CVE-2015-1419.patch ];
17 sed -i "/VSF_BUILD_SSL/s/^#undef/#define/" builddefs.h
19 substituteInPlace Makefile \
20 --replace -dirafter "" \
22 --replace /etc $out/etc \
23 --replace "-Werror" ""
26 mkdir -p $out/sbin $out/man/man{5,8}
30 "CC=${stdenv.cc.targetPrefix}cc"
33 NIX_LDFLAGS = "-lcrypt -lssl -lcrypto -lpam -lcap -lseccomp";
35 enableParallelBuilding = true;
38 tests = { inherit (nixosTests) vsftpd; };
42 description = "Very secure FTP daemon";
43 mainProgram = "vsftpd";
44 license = licenses.gpl2Only;
45 maintainers = with maintainers; [ peterhoeg ];
46 platforms = platforms.linux;