makeWrapper "$f" "$out" ${toString args}
'';
- # This adds header colors to the builds, but it rebuilds the whole
- # world from scratch, so only use it to debug!
- # add it as postHook in derivations
- immaePostHook = ''
- header() {
- echo -ne "\033[1;36m"
- echo -n "$1"
- echo -e "\033[0m"
- }
-
- echoCmd() {
- printf "\033[1;34m%s:\033[0m" "$1"
- shift
- printf ' %q' "$@"
- echo
- }
- '';
-
-} // (if builtins.pathExists ./lib/private then import ./lib/private else {})
+} // (if builtins.pathExists ./private then callPackage ./private {} else {})
-{ stdenv, fetchurl, openssl, postgresql, openldap }:
+{ ldapFtpId ? null
+, stdenv, fetchurl, openssl, postgresql, openldap }:
stdenv.mkDerivation rec {
name = "pure-ftpd-1.0.47";
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
git rebase --onto=$nur_root $first_commit master
clean_folder='
- rm -rf config modules/private pkgs/private nixops
- for bad in pkgs/crypto/cardano/default.nix; do
- if [ -f $bad ]; then
- rm -f $bad
- cat > $bad <<-EOF
- { runCommand, mylibs }:
- runCommand "empty" { preferLocalBuild = true; } "mkdir -p \$out"
-EOF
+ rm -rf config lib/private modules/private pkgs/private nixops
+ for broken in pkgs/crypto/cardano/default.nix; do
+ if [ -f $broken ]; then
+ rm -f $broken
+ cat > $broken <<-EOF
+ { runCommand, mylibs }:
+ runCommand "empty" { preferLocalBuild = true; } "mkdir -p \$out"
+ EOF
fi
done
'