Merge pull request #79123 from aanderse/apachectl
nixos/httpd: remove impurity from /etc
This commit is contained in:
commit
fd250d57bb
@ -10,6 +10,12 @@ let
|
|||||||
|
|
||||||
pkg = cfg.package.out;
|
pkg = cfg.package.out;
|
||||||
|
|
||||||
|
apachectl = pkgs.runCommand "apachectl" { meta.priority = -1; } ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${pkg}/bin/apachectl $out/bin/apachectl
|
||||||
|
sed -i $out/bin/apachectl -e 's|$HTTPD -t|$HTTPD -t -f ${httpdConf}|'
|
||||||
|
'';
|
||||||
|
|
||||||
httpdConf = cfg.configFile;
|
httpdConf = cfg.configFile;
|
||||||
|
|
||||||
php = cfg.phpPackage.override { apacheHttpd = pkg; };
|
php = cfg.phpPackage.override { apacheHttpd = pkg; };
|
||||||
@ -650,10 +656,10 @@ in
|
|||||||
postRun = "systemctl reload httpd.service";
|
postRun = "systemctl reload httpd.service";
|
||||||
}) (filterAttrs (name: hostOpts: hostOpts.enableACME) cfg.virtualHosts);
|
}) (filterAttrs (name: hostOpts: hostOpts.enableACME) cfg.virtualHosts);
|
||||||
|
|
||||||
environment.systemPackages = [ pkg ];
|
environment.systemPackages = [
|
||||||
|
apachectl
|
||||||
# required for "apachectl configtest"
|
pkg
|
||||||
environment.etc."httpd/httpd.conf".source = httpdConf;
|
];
|
||||||
|
|
||||||
services.httpd.phpOptions =
|
services.httpd.phpOptions =
|
||||||
''
|
''
|
||||||
|
@ -39,7 +39,6 @@ stdenv.mkDerivation rec {
|
|||||||
prePatch = ''
|
prePatch = ''
|
||||||
sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
|
sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|"
|
||||||
sed -i support/apachectl.in -e 's|@LYNX_PATH@|${lynx}/bin/lynx|'
|
sed -i support/apachectl.in -e 's|@LYNX_PATH@|${lynx}/bin/lynx|'
|
||||||
sed -i support/apachectl.in -e 's|$HTTPD -t|$HTTPD -t -f /etc/httpd/httpd.conf|'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Required for ‘pthread_cancel’.
|
# Required for ‘pthread_cancel’.
|
||||||
|
Loading…
Reference in New Issue
Block a user