nixpkgs/pkgs/by-name/vs/vsftpd/package.nix

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

49 lines
1.1 KiB
Nix
Raw Normal View History

2022-09-27 02:30:42 +00:00
{ lib, stdenv, fetchurl, libcap, libseccomp, openssl, pam, libxcrypt, 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=";
};
2022-09-27 02:30:42 +00:00
buildInputs = [ libcap openssl libseccomp pam libxcrypt ];
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 = "Very secure FTP daemon";
mainProgram = "vsftpd";
2024-05-23 08:44:51 +00:00
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
};
2013-11-07 15:14:59 +00:00
}