-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpfpm: eliminate build at evaluation time #23216
Conversation
@fkz, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bjornfor, @ericsagnes and @bluescreen303 to be potential reviewers. |
${cfg.phpOptions} | ||
''; | ||
|
||
phpIni = pkgs.stdenv.mkDerivation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, some variaton of
pkgs.runCommand "php.ini" { inherit (cfg) phpPackage phpOptions; } ''
cat $phpPackage/etc/php.ini > $out
echo $phpOptions >> $out
''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use passAsFile
:
pkgs.runCommand "php.ini" { inherit (cfg) phpPackage phpOptions; passAsFile = [ "phpOptions" ]; } ''
cat $phpPackage/etc/php.ini $phpOptionsFile > $out
''
phpfpm currently uses `readFile` to read the php.ini file from the phpPackage. This causes php to be build at evaluation time. This eliminates the use of readFile and builds the php.ini at build time.
This has broken php.ini customizations via |
@danbst Fixed. Thanks! |
Broken due to NixOS#23216. (cherry picked from commit d7674da)
Motivation for this change
phpfpm currently uses
readFile
to read the php.ini file from the phpPackage. This causes php to be build at evaluation time.This eliminates the use of readFile and builds the php.ini at build time.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
) (used the phpfpm service)