aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/ftp/pure-ftpd.nix
blob: 37ce6952c538bd3b21b2bdd099932a0c89769e8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchurl, openssl, postgresql, openldap }:

stdenv.mkDerivation rec {
  name = "pure-ftpd-1.0.47";

  src = fetchurl {
    url = "https://download.pureftpd.org/pub/pure-ftpd/releases/${name}.tar.gz";
    sha256 = "1b97ixva8m10vln8xrfwwwzi344bkgxqji26d0nrm1yzylbc6h27";
  };

  preConfigure = ''
    sed -i -e "s#FTPuid#immaeFtpUid#" src/log_ldap.h
    sed -i -e "s#FTPgid#immaeFtpGid#" src/log_ldap.h
    '';
  postConfigure = ''
    sed -i 's/define MAX_DATA_SIZE (40/define MAX_DATA_SIZE (70/' src/ftpd.h
    '';
  buildInputs = [ openssl postgresql openldap ];

  configureFlags = [ "--with-everything" "--with-tls" "--with-pgsql" "--with-ldap" ];

  meta = with stdenv.lib; {
    description = "A free, secure, production-quality and standard-conformant FTP server";
    homepage = https://www.pureftpd.org;
    license = licenses.isc; # with some parts covered by BSD3(?)
    maintainers = [ maintainers.lethalman ];
    platforms = platforms.linux;
  };
}