-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
PHP extensions as packages #82348
Merged
Merged
PHP extensions as packages #82348
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@etu interesting stuff! When you get around to it I'm curious to see some stats on this for a fully loaded |
etu
force-pushed
the
php-exts-as-packages
branch
17 times, most recently
from
March 14, 2020 15:22
7e1550a
to
f8e2e3e
Compare
etu
force-pushed
the
php-exts-as-packages
branch
8 times, most recently
from
March 14, 2020 17:20
a5a1cb2
to
74d77e5
Compare
etu
force-pushed
the
php-exts-as-packages
branch
from
March 14, 2020 17:22
74d77e5
to
d617aae
Compare
@GrahamcOfBorg build php72Packages.exts php73Packages.exts php74Packages.exts |
etu
force-pushed
the
php-exts-as-packages
branch
from
March 14, 2020 19:31
d617aae
to
f082b16
Compare
etu
force-pushed
the
php-exts-as-packages
branch
from
March 14, 2020 20:54
f082b16
to
e0b1b9d
Compare
Bit late to the party, but just took a look and the code and it seems pretty nice, thanks! |
This was referenced Mar 22, 2020
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
So this is based on some work I've done a long time ago and based on things that @gustavderdrache use to customize PHP in Nix.
It seems to work quite well on top of #79377 by @Ma27 :)
So the goal here is to build the different native extensions as separate derivations and then use them to compose a PHP package.
Example: Our default install of php doesn't have bz2 support.
Then I build a PHP using the following command:
nix-build --expr 'with import ./. {}; php74.buildEnv { exts = pp: with pp.exts; [ bz2 ]; }'
It builds a bit and I get a result symlink back, then when I run
./result/bin/php -m
I can seebz2
in the list of modules.I've got most extensions to work with two notable exceptions:
But I don't think that's a blocker for merging this. This still would provide new extensions for people needing some of the "native" extensions that we don't have enabled or even flags for without the need of compiling them themselves.
The next step would be to provide a minimal PHP to compose on top of and to use this minimal one to build our default php setup.
I've gone through all extensions for php 7.2, 7.3 and 7.4 and made sure that I have either made a comment or a build for each and everyone of the extensions in these three minor versions of php.
Some of the ones are oracle and other weird databases that we may have pecl's for anyways, so those I've left as comments for now. But they should be easy to move if needed.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)