diff --git a/pkgs/servers/ftp/vsftpd/default.nix b/pkgs/servers/ftp/vsftpd/default.nix index 6dc3cc162975..39b78958b031 100644 --- a/pkgs/servers/ftp/vsftpd/default.nix +++ b/pkgs/servers/ftp/vsftpd/default.nix @@ -14,9 +14,13 @@ stdenv.mkDerivation (rec { sed -i -e 's/-idirafter.*//' Makefile ''; - preBuild ='' - makeFlagsArray=( "LIBS=${if sslEnable then "-lcrypt -lssl -lcrypto " else ""}-lpam -lcap" ) - ''; + preBuild = let + sslLibs = if sslEnable then "-lcrypt -lssl -lcrypto " else ""; + in '' + makeFlagsArray=( "LIBS=${sslLibs}-lpam -lcap -fstack-protector" ) + ''; + + # It won't link without this flag, used in CFLAGS buildInputs = [ openssl libcap pam ];