]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/pure-ftpd/default.nix
Upgrade roundcube
[perso/Immae/Config/Nix.git] / pkgs / pure-ftpd / default.nix
1 { ldapFtpId ? null
2 , stdenv, fetchurl, openssl, postgresql, openldap }:
3
4 stdenv.mkDerivation rec {
5 name = "pure-ftpd-1.0.47";
6
7 src = fetchurl {
8 url = "https://download.pureftpd.org/pub/pure-ftpd/releases/${name}.tar.gz";
9 sha256 = "1b97ixva8m10vln8xrfwwwzi344bkgxqji26d0nrm1yzylbc6h27";
10 };
11
12 preConfigure = stdenv.lib.optionalString (!isNull ldapFtpId) ''
13 sed -i -e "s#FTPuid#${ldapFtpId}Uid#" src/log_ldap.h
14 sed -i -e "s#FTPgid#${ldapFtpId}Gid#" src/log_ldap.h
15 '';
16 postConfigure = ''
17 sed -i 's/define MAX_DATA_SIZE (40/define MAX_DATA_SIZE (70/' src/ftpd.h
18 '';
19 buildInputs = [ openssl postgresql openldap ];
20
21 configureFlags = [ "--with-everything" "--with-tls" "--with-pgsql" "--with-ldap" ];
22
23 meta = with stdenv.lib; {
24 description = "A free, secure, production-quality and standard-conformant FTP server";
25 homepage = https://www.pureftpd.org;
26 license = licenses.isc; # with some parts covered by BSD3(?)
27 maintainers = [ maintainers.lethalman ];
28 platforms = platforms.linux;
29 };
30 }