From a3eb56c4fc73da93d42c9298cc94aafffca0bd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 28 May 2019 00:34:01 +0200 Subject: Remove private specificities from pure-ftpd package and lib --- pkgs/pure-ftpd/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'pkgs/pure-ftpd/default.nix') diff --git a/pkgs/pure-ftpd/default.nix b/pkgs/pure-ftpd/default.nix index 37ce6952..32a7a91e 100644 --- a/pkgs/pure-ftpd/default.nix +++ b/pkgs/pure-ftpd/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, openssl, postgresql, openldap }: +{ ldapFtpId ? null +, stdenv, fetchurl, openssl, postgresql, openldap }: stdenv.mkDerivation rec { name = "pure-ftpd-1.0.47"; @@ -8,9 +9,9 @@ stdenv.mkDerivation rec { sha256 = "1b97ixva8m10vln8xrfwwwzi344bkgxqji26d0nrm1yzylbc6h27"; }; - preConfigure = '' - sed -i -e "s#FTPuid#immaeFtpUid#" src/log_ldap.h - sed -i -e "s#FTPgid#immaeFtpGid#" src/log_ldap.h + preConfigure = stdenv.lib.optionalString (!isNull ldapFtpId) '' + sed -i -e "s#FTPuid#${ldapFtpId}Uid#" src/log_ldap.h + sed -i -e "s#FTPgid#${ldapFtpId}Gid#" src/log_ldap.h ''; postConfigure = '' sed -i 's/define MAX_DATA_SIZE (40/define MAX_DATA_SIZE (70/' src/ftpd.h -- cgit v1.2.3