[Nix-dev] Making PHP find sendmail by default
Marc Weber
marco-oweber at gmx.de
Thu Sep 19 18:06:09 CEST 2013
One way is to use php.ini,
another is to apply this patch.
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index cc57e09..804fe12 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -48,6 +48,8 @@
, lessThan53 ? builtins.lessThan (builtins.compareVersions version "5.3") 0 # you're not supposed to pass this
, lessThan54 ? builtins.lessThan (builtins.compareVersions version "5.4") 0
, lessThan55 ? builtins.lessThan (builtins.compareVersions version "5.5") 0
+
+, sendmail ? "/var/setuid-wrappers/sendmail"
}:
/* version specific notes:
@@ -396,6 +398,10 @@ let
sed -i 's/EXEEXT = \.dSYM/EXEEXT =/' Makefile
'';
+ preBuild = ''
+ sed -i 's@#define PHP_PROG_SENDMAIL ""@#define PHP_PROG_SENDMAIL "${sendmail}"@' main/build-defs.h
+ '';
+
installPhase = ''
unset installPhase; installPhase;
cp php.ini-${ if lessThan53
The patch will be integrated in my php topic branch on my github page.
If you want it in official nixpkgs apply it yourself
Marc Weber
More information about the nix-dev
mailing list